summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-18 09:28:22 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-18 09:28:22 (GMT)
commit5da652e374eef3eeb7483188ddfe8c84033b2a23 (patch)
treec3aa29ff0e79ad8ab9e74ce1ac225019aaf9569f /Doc
parentf88f739012fe5e4cb4f6736790d34d94d23e7cde (diff)
downloadcpython-5da652e374eef3eeb7483188ddfe8c84033b2a23.zip
cpython-5da652e374eef3eeb7483188ddfe8c84033b2a23.tar.gz
cpython-5da652e374eef3eeb7483188ddfe8c84033b2a23.tar.bz2
Add versionadded tags to new math functions.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/math.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 1ae5bdc..61a6fd6 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -42,11 +42,15 @@ Number-theoretic and representation functions:
Return the absolute value of *x*.
+
.. function:: factorial(x)
Return *x* factorial. Raises :exc:`ValueError` if *x* is not integral or
is negative.
+ .. versionadded:: 2.6
+
+
.. function:: floor(x)
Return the floor of *x* as a float, the largest integer value less than or equal
@@ -107,6 +111,7 @@ Number-theoretic and representation functions:
Return the fractional and integer parts of *x*. Both results carry the sign of
*x*, and both are floats.
+
.. function:: sum(iterable)
Return an accurate floating point sum of values in the iterable. Avoids
@@ -114,6 +119,9 @@ Number-theoretic and representation functions:
algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
typical case where the rounding mode is half-even.
+ .. versionadded:: 2.6
+
+
.. function:: trunc(x)
Return the :class:`Real` value *x* truncated to an :class:`Integral` (usually
@@ -121,6 +129,7 @@ Number-theoretic and representation functions:
.. versionadded:: 2.6
+
Note that :func:`frexp` and :func:`modf` have a different call/return pattern
than their C equivalents: they take a single argument and return a pair of
values, rather than returning their second return value through an 'output
@@ -134,7 +143,6 @@ necessarily has no fractional bits.
Power and logarithmic functions:
-
.. function:: exp(x)
Return ``e**x``.
@@ -179,8 +187,8 @@ Power and logarithmic functions:
Return the square root of *x*.
-Trigonometric functions:
+Trigonometric functions:
.. function:: acos(x)
@@ -227,8 +235,8 @@ Trigonometric functions:
Return the tangent of *x* radians.
-Angular conversion:
+Angular conversion:
.. function:: degrees(x)
@@ -239,8 +247,8 @@ Angular conversion:
Converts angle *x* from degrees to radians.
-Hyperbolic functions:
+Hyperbolic functions:
.. function:: acosh(x)
@@ -278,10 +286,8 @@ Hyperbolic functions:
Return the hyperbolic tangent of *x*.
-
The module also defines two mathematical constants:
-
.. data:: pi
The mathematical constant *pi*.