diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2008-07-30 16:25:16 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2008-07-30 16:25:16 (GMT) |
commit | ff3fdce0d27f38ebeb31d9fef7d4009b54db0dd0 (patch) | |
tree | 54a2f09f3fa454fd3b153e2b132dc196cf2236a7 /Modules | |
parent | fef6b13c3261b9c91d38247f5ff99a411d71ab13 (diff) | |
download | cpython-ff3fdce0d27f38ebeb31d9fef7d4009b54db0dd0.zip cpython-ff3fdce0d27f38ebeb31d9fef7d4009b54db0dd0.tar.gz cpython-ff3fdce0d27f38ebeb31d9fef7d4009b54db0dd0.tar.bz2 |
Replace math.sum with math.fsum in a couple of comments
that were missed by r65308
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mathmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index ef33dab..79c55d8 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -341,7 +341,7 @@ FUNC1(tanh, tanh, 0, Note 4: A similar implementation is in Modules/cmathmodule.c. Be sure to update both when making changes. - Note 5: The signature of math.sum() differs from __builtin__.sum() + Note 5: The signature of math.fsum() differs from __builtin__.sum() because the start argument doesn't make sense in the context of accurate summation. Since the partials table is collapsed before returning a result, sum(seq2, start=sum(seq1)) may not equal the @@ -506,7 +506,7 @@ math_fsum(PyObject *self, PyObject *seq) Needed so that sum([1e-16, 1, 1e16]) will round-up the last digit to two instead of down to zero (the 1e-16 makes the 1 slightly closer to two). With a potential 1 ULP rounding - error fixed-up, math.sum() can guarantee commutativity. */ + error fixed-up, math.fsum() can guarantee commutativity. */ if (n > 0 && ((lo < 0.0 && p[n-1] < 0.0) || (lo > 0.0 && p[n-1] > 0.0))) { y = lo * 2.0; |