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 mark.dickinson
Recipients gboutsioukis, mark.dickinson
Date 2008-08-17.15:35:35
SpamBayes Score 6.499841e-08
Marked as misclassified No
Message-id <1218987336.41.0.842242365605.issue1869@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-08-17 15:35:36mark.dickinsonsetrecipients: + mark.dickinson, gboutsioukis
2008-08-17 15:35:36mark.dickinsonsetmessageid: <1218987336.41.0.842242365605.issue1869@psf.upfronthosting.co.za>
2008-08-17 15:35:35mark.dickinsonlinkissue1869 messages
2008-08-17 15:35:35mark.dickinsoncreate