Message107094
| 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 | <1275682453.32.0.303188053523.issue8860@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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". |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-06-04 20:14:13 | belopolsky | set | recipients: + belopolsky, tim.peters, mcherm, rhettinger, mark.dickinson, vstinner, stutzbach |
| 2010-06-04 20:14:13 | belopolsky | set | messageid: <1275682453.32.0.303188053523.issue8860@psf.upfronthosting.co.za> |
| 2010-06-04 20:14:12 | belopolsky | link | issue8860 messages |
| 2010-06-04 20:14:11 | belopolsky | create | |