]> granicus.if.org Git - python/commitdiff
Docs for Issue 2819.
authorRaymond Hettinger <python@rcn.com>
Fri, 23 May 2008 00:49:27 +0000 (00:49 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 23 May 2008 00:49:27 +0000 (00:49 +0000)
Doc/library/math.rst

index 9bccf5dcd6c3cc88d6c4a84db2020f9ed477b02c..b98f1649a32af12f2e919407362bfd2188b2349f 100644 (file)
@@ -103,6 +103,12 @@ 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
+   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.
 
 .. function:: trunc(x)