This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author TD22057
Recipients TD22057, vstinner
Date 2008-10-13.17:44:51
SpamBayes Score 9.734137e-10
Marked as misclassified No
Message-id <1223919892.92.0.608252128233.issue4114@psf.upfronthosting.co.za>
In-reply-to
Content
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.

There is no 32 bit float type in python that I can allocate.  If you
want a 32 bit type as an input, try this:

>>> v=123456789
>>> struct.unpack(fmt,struct.pack(fmt,v))
(123456792.0,)
History
Date User Action Args
2008-10-13 17:44:52TD22057setrecipients: + TD22057, vstinner
2008-10-13 17:44:52TD22057setmessageid: <1223919892.92.0.608252128233.issue4114@psf.upfronthosting.co.za>
2008-10-13 17:44:52TD22057linkissue4114 messages
2008-10-13 17:44:51TD22057create