Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > "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). _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4114> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com