[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics
report at bugs.python.org
Fri Jun 4 22:22:01 CEST 2010
Mark Dickinson <dickinsm at gmail.com> added the comment:
> The timedelta(seconds=0.6112295) example is handled correctly
No, it's not! It's being rounded *up* where it should be being rounded *down*.
> because 0.6112295 sec is not half way between two nearest microseconds
Exactly. The actual value stored by the C double is a little closer to 0.611229 than to 0.611230.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list