summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2023-08-08 17:30:33 (GMT)
committerGitHub <noreply@github.com>2023-08-08 17:30:33 (GMT)
commitaab6f7173a3b825599629dd6fa5cb7e477421595 (patch)
tree733c4cfc21fdf2e7b776da2f3199a83476b86506
parentd4ac094cf9d15ec5705ec0fe8771df9e6ba915b9 (diff)
downloadcpython-aab6f7173a3b825599629dd6fa5cb7e477421595.zip
cpython-aab6f7173a3b825599629dd6fa5cb7e477421595.tar.gz
cpython-aab6f7173a3b825599629dd6fa5cb7e477421595.tar.bz2
GH-100425: Note improved commutativity in sum(). (GH-107785)
-rw-r--r--Doc/library/functions.rst2
-rw-r--r--Doc/whatsnew/3.12.rst4
2 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index b271067..88a7fdf 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1752,7 +1752,7 @@ are always available. They are listed here in alphabetical order.
The *start* parameter can be specified as a keyword argument.
.. versionchanged:: 3.12 Summation of floats switched to an algorithm
- that gives higher accuracy on most builds.
+ that gives higher accuracy and better commutativity on most builds.
.. class:: super()
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 6553013..8ed4354 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -504,8 +504,8 @@ Other Language Changes
* :class:`slice` objects are now hashable, allowing them to be used as dict keys and
set items. (Contributed by Will Bradshaw, Furkan Onder, and Raymond Hettinger in :gh:`101264`.)
-* :func:`sum` now uses Neumaier summation to improve accuracy when summing
- floats or mixed ints and floats.
+* :func:`sum` now uses Neumaier summation to improve accuracy and commutativity
+ when summing floats or mixed ints and floats.
(Contributed by Raymond Hettinger in :gh:`100425`.)
* Exceptions raised in a typeobject's ``__set_name__`` method are no longer