Skip to content

Commit 74f5902

Browse files
committed
Issue python#9498: Add reference to sys.float_info from 'numeric types' docs.
Thanks Yitz Gale.
1 parent 560f764 commit 74f5902

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,15 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex`
217217
There are three distinct numeric types: :dfn:`integers`, :dfn:`floating
218218
point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a
219219
subtype of integers. Integers have unlimited precision. Floating point
220-
numbers are implemented using :ctype:`double` in C---all bets on their
221-
precision are off unless you happen to know the machine you are working
222-
with. Complex numbers have a real and imaginary part, which are each
223-
implemented using :ctype:`double` in C. To extract these parts from a
224-
complex number *z*, use ``z.real`` and ``z.imag``. (The standard library
225-
includes additional numeric types, :mod:`fractions` that hold rationals,
226-
and :mod:`decimal` that hold floating-point numbers with user-definable
227-
precision.)
220+
numbers are usually implemented using :ctype:`double` in C; information
221+
about the precision and internal representation of floating point
222+
numbers for the machine on which your program is running is available
223+
in :data:`sys.float_info`. Complex numbers have a real and imaginary
224+
part, which are each a floating point number. To extract these parts
225+
from a complex number *z*, use ``z.real`` and ``z.imag``. (The standard
226+
library includes additional numeric types, :mod:`fractions` that hold
227+
rationals, and :mod:`decimal` that hold floating-point numbers with
228+
user-definable precision.)
228229

229230
.. index::
230231
pair: numeric; literals

0 commit comments

Comments
 (0)