[issue1869] Builtin round function is sometimes inaccurate for floats
report at bugs.python.org
Sun Aug 17 20:05:21 CEST 2008
George Boutsioukis <gboutsioukis at gmail.com> added the comment:
Yes, I see where you are going with this and I agree. I think the py3k
round function is a bit more accurate, any chance this can be backported
to 2.7(after modifying the half-rounding)?
Anyway, I was just playing around with the code when I wrote this patch.
Anything beyond math.h(and only the really portable functions) is
obviously out of the question, so there's little here to work with.
Despite the (rare) unpredictable results, I think this issue is probably
too minor to spend any more time on;IMO nobody really relies on round()
for accuracy anyway. Perhaps this should be just ignored.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list