[Python-checkins] r60638 - python/trunk/Doc/library/decimal.rst
mark.dickinson
python-checkins at python.org
Thu Feb 7 02:42:06 CET 2008
Author: mark.dickinson
Date: Thu Feb 7 02:42:06 2008
New Revision: 60638
Modified:
python/trunk/Doc/library/decimal.rst
Log:
IEEE 754 should be IEEE 854; give precise reference for
comparisons involving NaNs.
Modified: python/trunk/Doc/library/decimal.rst
==============================================================================
--- python/trunk/Doc/library/decimal.rst (original)
+++ python/trunk/Doc/library/decimal.rst Thu Feb 7 02:42:06 2008
@@ -1295,12 +1295,12 @@
quiet or signaling :const:`NaN` always returns :const:`False` (even when doing
``Decimal('NaN')==Decimal('NaN')``), while a test for inequality always returns
:const:`True`. An attempt to compare two Decimals using any of the ``<``,
-``<=``, ``>`` or ``>=`` operators will raise the
-:exc:`InvalidOperation` signal if either operand is a :const:`NaN`, and return
-:const:`False` if this signal is trapped. Note that the General Decimal
-Arithmetic specification does not specify the behavior of direct comparisons;
-these rules for comparisons involving a :const:`NaN` were taken from the IEEE
-754 standard. To ensure strict standards-compliance, use the :meth:`compare`
+``<=``, ``>`` or ``>=`` operators will raise the :exc:`InvalidOperation` signal
+if either operand is a :const:`NaN`, and return :const:`False` if this signal is
+trapped. Note that the General Decimal Arithmetic specification does not
+specify the behavior of direct comparisons; these rules for comparisons
+involving a :const:`NaN` were taken from the IEEE 854 standard (see Table 3 in
+section 5.7). To ensure strict standards-compliance, use the :meth:`compare`
and :meth:`compare-signal` methods instead.
The signed zeros can result from calculations that underflow. They keep the sign
More information about the Python-checkins
mailing list