summaryrefslogtreecommitdiff
path: root/Doc/library/math.rst
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-01-03 02:21:52 +0000
committerJeffrey Yasskin <jyasskin@gmail.com>2008-01-03 02:21:52 +0000
commit7a3955c3dd0219fe87167eba573f736f8ddd7566 (patch)
tree1cadf8efc0a259bdce3e9290aa8783c7d750ee51 /Doc/library/math.rst
parentbbb0ef90818766e1affaf6facd005eb692777d84 (diff)
downloadcpython-7a3955c3dd0219fe87167eba573f736f8ddd7566.tar.gz
Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361, r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new documentation. The only significant difference is that round(x) returns a float to preserve backward-compatibility. See http://bugs.python.org/issue1689.
Diffstat (limited to 'Doc/library/math.rst')
-rw-r--r--Doc/library/math.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 17c75d3f82..f92610f0f0 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -26,8 +26,9 @@ Number-theoretic and representation functions:
.. function:: ceil(x)
- Return the ceiling of *x* as a float, the smallest integer value greater than or
- equal to *x*.
+ Return the ceiling of *x* as a float, the smallest integer value greater than
+ or equal to *x*. If *x* is not a float, delegates to ``x.__ceil__()``, which
+ should return an :class:`Integral` value.
.. function:: fabs(x)
@@ -37,8 +38,9 @@ Number-theoretic and representation functions:
.. function:: floor(x)
- Return the floor of *x* as a float, the largest integer value less than or equal
- to *x*.
+ Return the floor of *x* as a float, the largest integer value less than or
+ equal to *x*. If *x* is not a float, delegates to ``x.__floor__()``, which
+ should return an :class:`Integral` value.
.. function:: fmod(x, y)