[SciPy-user] Floating-point summation
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Tue Dec 14 06:42:55 EST 2004
Robert Kern wrote:
> Nils Wagner wrote:
>
>> Hi all,
>>
>> Afaik scipy's sum(x) relies on Numeric's sum implementation.
>> However, the result of the actual implementation of sum(x) may be
>> inaccurate
>> as illustrated in the small example (sum.py).
>>
>> Any comment ?
>
>
> Implement kahan_sum() in C for all types, and I'll stick it in
> scipy_base. I'm inclined to leave sum() as it is for performance reasons.
>
Unfortunately, I am not familiar with C, but I found a paper
by Evan Manning
*Manning, Evan, /Floating Point Summation/. C/C++ Users Journal
<http://www.cuj.com/>, September 1996. *
http://alumnus.caltech.edu/~manning/
http://www.cuj.com/
Nils
More information about the SciPy-User
mailing list