[issue4114] struct returns incorrect 4 byte float

STINNER Victor report at bugs.python.org
Mon Oct 13 19:17:46 CEST 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Why do you use float (32 bits) instead of double (64 bits)? Your 
example use:
 double (python) -> float (C) -> double (python)

If you convert 64 bits float to 32 bits, for sure you will loose some 
digits. It's not a bug in Python, but a problem in your code ;-)

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4114>
_______________________________________


More information about the Python-bugs-list mailing list