Most of the time floating point arithmetic does
approximately the right thing. When adding sums or having products
of numbers that greatly differ in magnitude, the floating point
arithmetic may be incorrect. This package implements the Kahan
(1965) sum , Neumaier (1974) sum
, pairwise-sum (adapted from 'NumPy',
See Castaldo (2008) for a discussion of
accuracy), and arbitrary precision sum (adapted from the fsum in
'Python' ; Shewchuk (1997)
). In addition,
products are changed to long double precision for accuracy, or
changed into a log-sum for accuracy.