Rounding Bug in Python 2.0! - ugh

Pete Forman gsez020 at
Mon Nov 6 10:09:08 CET 2000

"Tim Peters" <tim_one at> writes:

> But then we also have to replace the input routines, as getting away
> with that choice requires I/O accuracy greater than is required by
> the 754 std (so we can't count on vendor input routines "to work"
> well enough).

I don't see that the input routines need to be replaced.  Admittedly
the C Standard only recommends that decimals be correctly converted to
binary.  I'd expect that most implementations would round correctly.
Is there a reason other than poor QOI for rounding incorrectly?  I/O
is intrinsicly slow, so there would be little merit in using a
conversion routine that was faster and less accurate.

Output is a different matter as there is no standard way to display
minimal length decimals.
Pete Forman                 -./\.- Disclaimer: This post is originated
Western Geophysical           -./\.-  by myself and does not represent
pete.forman at         -./\.-  the opinion of Baker Hughes or  -./\.-  its divisions.

More information about the Python-list mailing list