summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-07-30 16:20:10 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2008-07-30 16:20:10 (GMT)
commitfef6b13c3261b9c91d38247f5ff99a411d71ab13 (patch)
tree3c791f6d97dd707da784b5818352b1a0f09b955d /Doc
parentf2eb2b44fc532c77c03bc95789817a20d7c558c3 (diff)
downloadcpython-fef6b13c3261b9c91d38247f5ff99a411d71ab13.zip
cpython-fef6b13c3261b9c91d38247f5ff99a411d71ab13.tar.gz
cpython-fef6b13c3261b9c91d38247f5ff99a411d71ab13.tar.bz2
Rename math.sum to math.fsum
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/math.rst20
-rw-r--r--Doc/whatsnew/2.6.rst2
2 files changed, 11 insertions, 11 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 61a6fd6..5740759 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -83,6 +83,16 @@ Number-theoretic and representation functions:
apart" the internal representation of a float in a portable way.
+.. function:: fsum(iterable)
+
+ Return an accurate floating point sum of values in the iterable. Avoids
+ loss of precision by tracking multiple intermediate partial sums. The
+ algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
+ typical case where the rounding mode is half-even.
+
+ .. versionadded:: 2.6
+
+
.. function:: isinf(x)
Checks if the float *x* is positive or negative infinite.
@@ -112,16 +122,6 @@ Number-theoretic and representation functions:
*x*, and both are floats.
-.. function:: sum(iterable)
-
- Return an accurate floating point sum of values in the iterable. Avoids
- loss of precision by tracking multiple intermediate partial sums. The
- 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
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index a8d89cb..9959ecd 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1537,7 +1537,7 @@ Here are all of the changes that Python 2.6 makes to the core Python language.
* :func:`~math.factorial` computes the factorial of a number.
(Contributed by Raymond Hettinger; :issue:`2138`.)
- * :func:`~math.sum` adds up the stream of numbers from an iterable,
+ * :func:`~math.fsum` adds up the stream of numbers from an iterable,
and is careful to avoid loss of precision by calculating partial sums.
(Contributed by Jean Brouwers, Raymond Hettinger, and Mark Dickinson;
:issue:`2819`.)