Skip to content

Commit 32df540

Browse files
authored
gh-100425: Update tutorial docs related to sum() accuracy (FH-101854)
1 parent 71f614e commit 32df540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tutorial/stdlib2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ point::
394394

395395
>>> sum([Decimal('0.1')]*10) == Decimal('1.0')
396396
True
397-
>>> sum([0.1]*10) == 1.0
397+
>>> 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 == 1.0
398398
False
399399

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

0 commit comments

Comments
 (0)