summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-08-04 18:43:36 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-08-04 18:43:36 (GMT)
commite56a386e0e787162b1deffa15a07538d06ad6ce0 (patch)
tree9a843d5cd97df8f6ac00b686f31ca6e4044a5835 /Doc/library
parentfe2f4ecc14aefd236d2f39546976bcebe1ef29e5 (diff)
downloadcpython-e56a386e0e787162b1deffa15a07538d06ad6ce0.zip
cpython-e56a386e0e787162b1deffa15a07538d06ad6ce0.tar.gz
cpython-e56a386e0e787162b1deffa15a07538d06ad6ce0.tar.bz2
Merged revisions 83732 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83732 | mark.dickinson | 2010-08-04 19:42:43 +0100 (Wed, 04 Aug 2010) | 3 lines Issue #9498: Add reference to sys.float_info from 'numeric types' docs. Thanks Yitz Gale. ........
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/stdtypes.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index bf125bd..ef1fbee85 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -216,14 +216,15 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex`
There are three distinct numeric types: :dfn:`integers`, :dfn:`floating
point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a
subtype of integers. Integers have unlimited precision. Floating point
-numbers are implemented using :ctype:`double` in C---all bets on their
-precision are off unless you happen to know the machine you are working
-with. Complex numbers have a real and imaginary part, which are each
-implemented using :ctype:`double` in C. To extract these parts from a
-complex number *z*, use ``z.real`` and ``z.imag``. (The standard library
-includes additional numeric types, :mod:`fractions` that hold rationals,
-and :mod:`decimal` that hold floating-point numbers with user-definable
-precision.)
+numbers are usually implemented using :ctype:`double` in C; information
+about the precision and internal representation of floating point
+numbers for the machine on which your program is running is available
+in :data:`sys.float_info`. Complex numbers have a real and imaginary
+part, which are each a floating point number. To extract these parts
+from a complex number *z*, use ``z.real`` and ``z.imag``. (The standard
+library includes additional numeric types, :mod:`fractions` that hold
+rationals, and :mod:`decimal` that hold floating-point numbers with
+user-definable precision.)
.. index::
pair: numeric; literals