[issue5473] round(float, ndigits<0) sometimes rounds to odd
Mark Dickinson
report at bugs.python.org
Fri Mar 13 23:37:53 CET 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
Actually the negative n case *is* quite different from the positive n,
although I think it's fair to say that the issue 1869 title covers both
cases fairly well. :)
It's not at all hard to make sure that round(x, -n) correct for -22 <= -n
<= 0 and any finite x, using the fact that the remainder fmod(x, 10.0**-n)
is exactly representable as a float. I'll try to find time to implement
this before 3.1. Positive n is still tricky, though.
Anyway, I'm going to close this and fold the discussion into issue 1869.
Thanks for the report!
----------
status: pending -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5473>
_______________________________________
More information about the Python-bugs-list
mailing list