Mark Dickinson <[EMAIL PROTECTED]> added the comment: Hit submit too soon; sorry...
But it would be reasonable to aim for correctly rounded results when the second argument to round is not too large (less than 22 in absolute value, for example), so that 10**abs(n) is exactly representable as a double. I think this should be easy when n is negative (use fmod to compute the remainder, and subtract the remainder from the original number to round down, or add (10**-n - remainder) to round up, and a little bit more involved when n is positive. Note that the 3.x version will need to be slightly different, so that it does round-half-to-even instead of round-half-away-from-zero. I think that while these changes could be considered bugfixes they're not essential, so should be put off until 2.7/3.1. ---------- versions: -Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1869> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com