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.
diff --git a/Misc/NEWS b/Misc/NEWS
index 77aa054..7a37f79 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1105,6 +1105,11 @@
 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.