[issue2819] Full precision summation
Terry J. Reedy
report at bugs.python.org
Sat Aug 2 22:16:57 CEST 2008
Terry J. Reedy <tjreedy at udel.edu> added the comment:
> I'm pretty sure it *was* merged: math.sum should be the full-precision
> summation in both recent betas (2.6b2 and 3.0b2). Try comparing
> sum([1e100, 1, -1e100, -1]) and math.sum([1e100, 1, -1e100, -1])---they
> should produce -1.0 and 0.0 respectively.
They do. I realize now that two different built-in funcs in two
different modules but with the same name will give the same
representation. That is so unusual, I was not expecting it.
> The name change to fsum only happened in the last few days.
Which will prevent the confusion I had ;-). Good idea.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2819>
_______________________________________
More information about the Python-bugs-list
mailing list