diff options
author | neuralstring <107343209+neuralstring@users.noreply.github.com> | 2023-02-19 16:39:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 16:39:03 (GMT) |
commit | 32df540635cacce1053ee0ef98ee23f3f6a43c02 (patch) | |
tree | 4fdcda21d029510a250c714e9812dc357f217f1d | |
parent | 71f614ef2a3d66213b9cae807cbbc1ed03741221 (diff) | |
download | cpython-32df540635cacce1053ee0ef98ee23f3f6a43c02.zip cpython-32df540635cacce1053ee0ef98ee23f3f6a43c02.tar.gz cpython-32df540635cacce1053ee0ef98ee23f3f6a43c02.tar.bz2 |
gh-100425: Update tutorial docs related to sum() accuracy (FH-101854)
-rw-r--r-- | Doc/tutorial/stdlib2.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst index 0c101c1..33f311d 100644 --- a/Doc/tutorial/stdlib2.rst +++ b/Doc/tutorial/stdlib2.rst @@ -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:: |