Feature suggestion: sum() ought to use a compensated summation algorithm

sturlamolden sturlamolden at yahoo.no
Sat May 3 18:05:31 EDT 2008


On May 3, 10:13 pm, hdante <hda... at gmail.com> wrote:

>  I believe that moving this to third party could be better. What about
> numpy ? Doesn't it already have something similar ?

Yes, Kahan summation makes sence for numpy arrays. But the problem
with this algorithm is optimizing compilers. The programmer will be
forced to use tricks like inline assembly to get around the optimizer.
If not, the optimizer would remove the desired features of the
algorithm. But then we have a serious portability problem.



More information about the Python-list mailing list