]> granicus.if.org Git - python/commitdiff
Issue #9498: Add reference to sys.float_info from 'numeric types' docs.
authorMark Dickinson <dickinsm@gmail.com>
Wed, 4 Aug 2010 18:42:43 +0000 (18:42 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 4 Aug 2010 18:42:43 +0000 (18:42 +0000)
Thanks Yitz Gale.

Doc/library/stdtypes.rst

index 5f1b7320c0559e5ff720cbb2ae68184539e73aee..76921cd4607e6e97b7d9101ced8a31adb7948533 100644 (file)
@@ -217,14 +217,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