gh-100425: Update tutorial docs related to sum() accuracy (FH-101854)

This commit is contained in:
neuralstring 2023-02-19 16:39:03 +00:00 committed by GitHub
parent 71f614ef2a
commit 32df540635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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::