Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
74f5902b
Commit
74f5902b
authored
Aug 04, 2010
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9498: Add reference to sys.float_info from 'numeric types' docs.
Thanks Yitz Gale.
parent
560f7647
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+9
-8
No files found.
Doc/library/stdtypes.rst
View file @
74f5902b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment