]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-100425: Note improved commutativity in sum(). (GH-107785)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Tue, 8 Aug 2023 17:30:33 +0000 (19:30 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Aug 2023 17:30:33 +0000 (18:30 +0100)
Doc/library/functions.rst
Doc/whatsnew/3.12.rst

index b271067ae639c568fb7e16c7798bf047de9a3667..88a7fdfe6f0d50495fd574c1f232a01f2f158c17 100644 (file)
@@ -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()
index 6553013552d00381eb36b91e813762e3f658400f..8ed435476c9cec2e0aad3b0547c0f64d598d9da3 100644 (file)
@@ -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