Kaydet (Commit) 74f5902b authored tarafından Mark Dickinson's avatar Mark Dickinson

Issue #9498: Add reference to sys.float_info from 'numeric types' docs.

Thanks Yitz Gale.
üst 560f7647
...@@ -217,14 +217,15 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex` ...@@ -217,14 +217,15 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex`
There are three distinct numeric types: :dfn:`integers`, :dfn:`floating There are three distinct numeric types: :dfn:`integers`, :dfn:`floating
point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a
subtype of integers. Integers have unlimited precision. Floating point subtype of integers. Integers have unlimited precision. Floating point
numbers are implemented using :ctype:`double` in C---all bets on their numbers are usually implemented using :ctype:`double` in C; information
precision are off unless you happen to know the machine you are working about the precision and internal representation of floating point
with. Complex numbers have a real and imaginary part, which are each numbers for the machine on which your program is running is available
implemented using :ctype:`double` in C. To extract these parts from a in :data:`sys.float_info`. Complex numbers have a real and imaginary
complex number *z*, use ``z.real`` and ``z.imag``. (The standard library part, which are each a floating point number. To extract these parts
includes additional numeric types, :mod:`fractions` that hold rationals, from a complex number *z*, use ``z.real`` and ``z.imag``. (The standard
and :mod:`decimal` that hold floating-point numbers with user-definable library includes additional numeric types, :mod:`fractions` that hold
precision.) rationals, and :mod:`decimal` that hold floating-point numbers with
user-definable precision.)
.. index:: .. index::
pair: numeric; literals pair: numeric; literals
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment