mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Manually merge r67868 from 2.6 branch.
This commit is contained in:
parent
fe427895b5
commit
8c8cc6b392
1 changed files with 5 additions and 7 deletions
|
@ -338,15 +338,13 @@ Notes:
|
||||||
module: math
|
module: math
|
||||||
single: floor() (in module math)
|
single: floor() (in module math)
|
||||||
single: ceil() (in module math)
|
single: ceil() (in module math)
|
||||||
|
single: trunc() (in module math)
|
||||||
pair: numeric; conversions
|
pair: numeric; conversions
|
||||||
pair: C; language
|
|
||||||
|
|
||||||
Conversion from floating point to (long or plain) integer may round or
|
Conversion from floats using :func:`int` or :func:`long` truncates toward
|
||||||
truncate as in C; see functions :func:`math.floor` and :func:`math.ceil` for
|
zero like the related function, :func:`math.trunc`. Use the function
|
||||||
well-defined conversions.
|
:func:`math.floor` to round downward and :func:`math.ceil` to round
|
||||||
|
upward.
|
||||||
.. deprecated:: 2.6
|
|
||||||
Instead, convert floats to long explicitly with :func:`trunc`.
|
|
||||||
|
|
||||||
(3)
|
(3)
|
||||||
See :ref:`built-in-funcs` for a full description.
|
See :ref:`built-in-funcs` for a full description.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue