summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-05-08 14:35:02 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-05-08 14:35:02 (GMT)
commit0381e3f16a0d390e956c8adbe905d48e92de9cc6 (patch)
treeeda57579d3b4dda56a9e487766ffe849b0372b6d /Misc/NEWS
parent161b024b6d2e68295e89f24837a27da599638ea2 (diff)
downloadcpython-0381e3f16a0d390e956c8adbe905d48e92de9cc6.zip
cpython-0381e3f16a0d390e956c8adbe905d48e92de9cc6.tar.gz
cpython-0381e3f16a0d390e956c8adbe905d48e92de9cc6.tar.bz2
Issue #8644: Improve accuracy of timedelta.total_seconds, by doing intermediate
computations with integer arithmetic instead of floating point. td.total_seconds() now agrees with td / timedelta(seconds = 1). Thanks Alexander Belopolsky for the patch.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r--Misc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 77aa054..7a37f79 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1105,6 +1105,11 @@ Library
Extension Modules
-----------------
+- Issue #8644: The accuracy of td.total_seconds() has been improved (by
+ calculating with integer arithmetic instead of float arithmetic internally):
+ the result is now always correctly rounded, and is equivalent to td /
+ timedelta(seconds=1).
+
- Issue #2706: Allow division of a timedelta by another timedelta:
timedelta / timedelta, timedelta % timedelta, timedelta // timedelta
and divmod(timedelta, timedelta) are all supported.