Next: Tipical pitfalls with floating
Up: Computer Representation of Numbers
Previous: Exception Handling
  Contents
Long summations have a problem: since each individual summation brings an error
of 0.5 ulp in the partial result, the total result can be quite inaccurate.
Fixes
- compute the partial sums in a higher precision;
- sort the terms first;
- use Kahan's formula.
Adrian Sandu
2001-08-26