Accurate Floating Point Sums and Products
Get the function pointers to link in C
Return an accurate floating point sum of values
Using the Kahan method, take a more accurate sum
Using the Neumaier method, take a more accurate sum
Return an accurate floating point sum of values
Using PreciceSums's default method, take a product
Choose the type of product to use in PreciceSums. These are used in th...
Choose the type of sums to use for PreciceSums.
Using PreciceSums's default method, take a sum
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 <doi:10.1145/363707.363723>, Neumaier (1974) sum <doi:10.1002/zamm.19740540106>, pairwise-sum (adapted from 'NumPy', See Castaldo (2008) <doi:10.1137/070679946> for a discussion of accuracy), and arbitrary precision sum (adapted from the fsum in 'Python' ; Shewchuk (1997) <https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf>). In addition, products are changed to long double precision for accuracy, or changed into a log-sum for accuracy.