Skip to content

Commit

Permalink
Update floating point tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger committed Dec 22, 2022
1 parent 66db937 commit af7613e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/tutorial/floatingpoint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ added onto a running total. That can make a difference in overall accuracy
so that the errors do not accumulate to the point where they affect the
final total:

>>> sum([0.1] * 10) == 1.0
>>> 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 == 1.0
False
>>> math.fsum([0.1] * 10) == 1.0
True
Expand Down

0 comments on commit af7613e

Please sign in to comment.