[SciPy-user] Floating-point summation

Robert Kern rkern at ucsd.edu
Mon Dec 13 11:03:05 CST 2004


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.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the SciPy-user mailing list