neumaierSum

0th

Percentile

Using the Neumaier method, take a more accurate sum

Using the Neumaier method, take a more accurate sum

Usage
neumaierSum(numbers)
Arguments
numbers

A vector of numbers to sum.

Value

Sum of numbers, a bit more accurate than kahanSum

References

https://en.wikipedia.org/wiki/Kahan_summation_algorithm

Aliases
  • neumaierSum
Examples
# NOT RUN {
sum(c(1,1e100,1,-1e100)) ## Should be 2, gives 0
neumaierSum(c(1,1e100,1,-1e100)) ## Gives 2
# }
Documentation reproduced from package PreciseSums, version 0.3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.