Rename math.sum to math.fsum

This commit is contained in:
Mark Dickinson 2008-07-30 16:20:10 +00:00
parent f2eb2b44fc
commit fef6b13c32
5 changed files with 35 additions and 35 deletions

View file

@ -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