Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
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) False 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". ---------- components: +Extension Modules priority: normal -> low versions: +Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8860> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com