Message74704
> "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). |
|
Date |
User |
Action |
Args |
2008-10-13 22:22:51 | loewis | set | recipients:
+ loewis, vstinner, TD22057 |
2008-10-13 22:22:50 | loewis | link | issue4114 messages |
2008-10-13 22:22:50 | loewis | create | |
|