Rounding Bug in Python 2.0! - ugh

Moshe Zadka moshez at
Wed Nov 1 16:09:59 CET 2000

On 1 Nov 2000, Pete Forman wrote:

> It would be nice if Python would make use of dtoa() rather than stock
> sprintf() to display floating-point numbers.  There are variants of
> dtoa in netlib and libg++.

netlib and libg++ aren't always available.
Python is meant to be portable...

And anyway, the problem isn't necessarily one of display: you have to ways
to display floats:

str -- inaccurate but readable
repr -- (more) accurate but unreadable

Moshe Zadka <moshez at> -- 95855124

More information about the Python-list mailing list