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 loewis
Recipients TD22057, loewis, vstinner
Date 2008-10-13.21:45:58
SpamBayes Score 3.208535e-07
Marked as misclassified No
Message-id <1223934360.43.0.153143731297.issue4114@psf.upfronthosting.co.za>
In-reply-to
Content
I think the complaint is that presumably, when expanding the float to
double in unpacking, the result is not zero-padded. I cannot reproduce
the problem, though:

py>
hexlify(struct.pack(">d",struct.unpack(">f",struct.pack(">f",1.8183e-7))[0]))
'3e8867a1a0000000'

Seems to me that the zero-padding works just well.

TD22057, why do you say that 1.818300034983622e-07 is not the closest
number. AFAICT, this is not true: this *is* the closest number.
History
Date User Action Args
2008-10-13 21:46:00loewissetrecipients: + loewis, vstinner, TD22057
2008-10-13 21:46:00loewissetmessageid: <1223934360.43.0.153143731297.issue4114@psf.upfronthosting.co.za>
2008-10-13 21:45:58loewislinkissue4114 messages
2008-10-13 21:45:58loewiscreate