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 belopolsky
Recipients belopolsky, mark.dickinson, mcherm, rhettinger, stutzbach, tim.peters, vstinner
Date 2010-06-04.20:14:11
SpamBayes Score 0.041836068
Marked as misclassified No
Message-id <>
The timedelta(seconds=0.6112295) example is handled correctly because 0.6112295 sec is not half way between two nearest microseconds:

>>> abs(0.6112295 - 0.6112290) == abs(0.6112295 - 0.6112300)

The fact that it displays as if it is does not make timedelta rounding wrong.  I am still not sure that it is possible to accumulate rounding error by adding seven doubles, each < 1 to affect the rounded result.

While proving that the rounding is always correct or finding a counter-example is an interesting puzzle, I think it has little practical value.

I will add unit tests and get this patch ready for for commit review, but setting the priority to "low".
Date User Action Args
2010-06-04 20:14:13belopolskysetrecipients: + belopolsky, tim.peters, mcherm, rhettinger, mark.dickinson, vstinner, stutzbach
2010-06-04 20:14:13belopolskysetmessageid: <>
2010-06-04 20:14:12belopolskylinkissue8860 messages
2010-06-04 20:14:11belopolskycreate