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.22:22:50
SpamBayes Score 5.542836e-10
Marked as misclassified No
Message-id <48F3CA38.9050408@v.loewis.de>
In-reply-to <1223935606.0.0.648463321048.issue4114@psf.upfronthosting.co.za>
Content
> "Python is just reflecting what C is doing": the problem is deeper in 
> the silicium. If you want a better precision, use an arbitrary 
> precision float type like decimal.Decimal() or the GMP library 
> (Python: gmpy)

The problem is indeed deeper, however, I doubt GMP is an answer here:
we are talking about the struct module, which, *by design* gives access
to 32-bit (inprecise) floating point numbers - not because people
deliberately want to perform computations inaccurately, but because
there is often a need to interface with this specific representation
(which originally probably was created for its own reasons, such as
to save space, or because some hardware didn't support double
precision).
History
Date User Action Args
2008-10-13 22:22:51loewissetrecipients: + loewis, vstinner, TD22057
2008-10-13 22:22:50loewislinkissue4114 messages
2008-10-13 22:22:50loewiscreate