mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Rename math.sum to math.fsum
This commit is contained in:
parent
f2eb2b44fc
commit
fef6b13c32
5 changed files with 35 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue