[Python-checkins] r71822 - python/branches/py3k/Doc/library/decimal.rst
raymond.hettinger
python-checkins at python.org
Fri Apr 24 00:06:13 CEST 2009
Author: raymond.hettinger
Date: Fri Apr 24 00:06:12 2009
New Revision: 71822
Log:
Update decimal docs for the new floating point repr().
Modified:
python/branches/py3k/Doc/library/decimal.rst
Modified: python/branches/py3k/Doc/library/decimal.rst
==============================================================================
--- python/branches/py3k/Doc/library/decimal.rst (original)
+++ python/branches/py3k/Doc/library/decimal.rst Fri Apr 24 00:06:12 2009
@@ -30,9 +30,9 @@
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
More information about the Python-checkins
mailing list