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 gvanrossum
Recipients christian.heimes, gvanrossum, nascheme, noam, rhettinger, tim.peters
Date 2007-12-11.19:03:41
SpamBayes Score 0.009057652
Marked as misclassified No
Message-id <>
> Correct rounding is a property that needs to be proved, not tested.

I take it your position is that this can never be done 100% correctly so
it shouldn't go in?  That's disappointing, because the stream of
complaints that "round is broken" won't stop (we had two of these in the
bug tracker just this month).

I really want to address this without having to either change
interactive mode to use something besides repr() or changing repr() to
drop precision (assuming correctly rounding input).

We can fix the roundtripping in marshal and pickle and the like by
explicitly using "%.17g" % x instead of repr(x).  Scientists who worry
about roundtripping can also do this (though are there any scientists
who work on platforms that don't have correctly-rounding input routines?).

We can also fix it by adopting the Tcl string-to-float code.
Date User Action Args
2007-12-11 19:03:41gvanrossumsetspambayes_score: 0.00905765 -> 0.009057652
recipients: + gvanrossum, tim.peters, nascheme, rhettinger, christian.heimes, noam
2007-12-11 19:03:41gvanrossumsetspambayes_score: 0.00905765 -> 0.00905765
messageid: <>
2007-12-11 19:03:41gvanrossumlinkissue1580 messages
2007-12-11 19:03:41gvanrossumcreate