Skip to content

Commit

Permalink
gh-100425: Update tutorial docs related to sum() accuracy (FH-101854)
Browse files Browse the repository at this point in the history
  • Loading branch information
neuralstring authored Feb 19, 2023
1 parent 71f614e commit 32df540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/tutorial/stdlib2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ point::

>>> sum([Decimal('0.1')]*10) == Decimal('1.0')
True
>>> 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

The :mod:`decimal` module provides arithmetic with as much precision as needed::
Expand Down

0 comments on commit 32df540

Please sign in to comment.