Learn R Programming

RxODE (version 0.6-1)

rxPairwiseSum: Return an accurate floating point sum of values

Description

This was taken by NumPy and adapted for use here.

Usage

rxPairwiseSum(numbers)

Arguments

numbers

A vector of numbers to sum.

Value

A sum of numbers with a rounding error of O(lg n) instead of O(n).

References

https://github.com/juliantaylor/numpy/blob/b0bc01275cac04483e6df021211c1fa2ba65eaa3/numpy/core/src/umath/loops.c.src

https://github.com/numpy/numpy/pull/3685