Skip to content

Commit

Permalink
Remove out of date example for fsum()
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger committed Dec 22, 2022
1 parent 839cc05 commit 66db937
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Doc/library/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ Number-theoretic and representation functions
.. function:: fsum(iterable)

Return an accurate floating point sum of values in the iterable. Avoids
loss of precision by tracking multiple intermediate partial sums:

>>> sum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1])
0.9999999999999999
>>> fsum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1])
1.0
loss of precision by tracking multiple intermediate partial sums.

The algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
typical case where the rounding mode is half-even. On some non-Windows
Expand Down

0 comments on commit 66db937

Please sign in to comment.