TD22057 <ted.dr...@gmail.com> added the comment:
Is there any chance this will ever get fixed? Patches have been available for
5 years with no progress.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pytho
Changes by TD22057 ted.dr...@gmail.com:
--
nosy: +TD22057
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9338
___
___
Python-bugs-list mailing list
TD22057 [EMAIL PROTECTED] added the comment:
That's not my code - it's an example ;)
My code reads binary data from a hardware system that is encoding 32 bit
floats. The numbers I get back from struct.decode have garbage appended
on the end of the floating point numbers beyond the 32 bit range
TD22057 [EMAIL PROTECTED] added the comment:
I'm receiving a 32 bit floating point number encoded in binary format.
The correct value for that number is 1.8183e-7 which can be expressed in
single precision just fine. Given that the number in the binary
encoding is 1.8183e-7, I expected to get
TD22057 [EMAIL PROTECTED] added the comment:
Martin is correct. I expected (naively) that struct would zero pad the
digits beyond the significant digits of a float. As to whether it's
exact or not, see my first message:
v=1.8183e-7
v
1.81830001e-07
Since 32 bit floats only have ~7