Skip to content

Commit aab6f71

Browse files
authored
GH-100425: Note improved commutativity in sum(). (GH-107785)
1 parent d4ac094 commit aab6f71

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,7 @@ are always available. They are listed here in alphabetical order.
17521752
The *start* parameter can be specified as a keyword argument.
17531753

17541754
.. versionchanged:: 3.12 Summation of floats switched to an algorithm
1755-
that gives higher accuracy on most builds.
1755+
that gives higher accuracy and better commutativity on most builds.
17561756

17571757

17581758
.. class:: super()

Doc/whatsnew/3.12.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ Other Language Changes
504504
* :class:`slice` objects are now hashable, allowing them to be used as dict keys and
505505
set items. (Contributed by Will Bradshaw, Furkan Onder, and Raymond Hettinger in :gh:`101264`.)
506506

507-
* :func:`sum` now uses Neumaier summation to improve accuracy when summing
508-
floats or mixed ints and floats.
507+
* :func:`sum` now uses Neumaier summation to improve accuracy and commutativity
508+
when summing floats or mixed ints and floats.
509509
(Contributed by Raymond Hettinger in :gh:`100425`.)
510510

511511
* Exceptions raised in a typeobject's ``__set_name__`` method are no longer

0 commit comments

Comments
 (0)