Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d258d1e7
Commit
d258d1e7
authored
Apr 23, 2009
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update decimal docs for the new floating point repr().
parent
4a16e3a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Doc/library/decimal.rst
Doc/library/decimal.rst
+3
-3
No files found.
Doc/library/decimal.rst
View file @
d258d1e7
...
...
@@ -30,9 +30,9 @@ arithmetic. It offers several advantages over the :class:`float` datatype:
people learn at school." -- excerpt from the decimal arithmetic specification.
* Decimal numbers can be represented exactly. In contrast, numbers like
:const:`1.1`
do not have an exact representation in binary floating point. End
users typically would not expect :const:`1.1` to display as
:const:`1.1000000000000001
` as it does with binary floating point.
:const:`1.1`
and :const:`2.2` do not have an exact representations in binary
floating point. End users typically would not expect ``1.1 + 2.2`` to display
as :const:`3.3000000000000003
` as it does with binary floating point.
* The exactness carries over into arithmetic. In decimal floating point, ``0.1
+ 0.1 + 0.1 - 0.3`` is exactly equal to zero. In binary floating point, the result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment