PreciseSums

Accurate Floating Point Sums and Products

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) <http://www.cs.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.

Total

854

Last month

252

Last week

55

Average per day

8

Daily downloads

Total downloads

Description file content

Package
PreciseSums
Title
Accurate Floating Point Sums and Products
Version
0.3
Description
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.
Depends
R (>= 3.2)
License
GPL (>= 2)
Encoding
UTF-8
LazyData
true
RoxygenNote
6.0.1
Suggests
testthat
NeedsCompilation
yes
Packaged
2018-04-12 16:16:37 UTC; FIDLEMA3
Author
Matthew Fidler [aut, cre, cph], Raymond Hettinger [cph, aut], Jonathan Shewchuk [cph, aut], Julian Taylor [cph, aut], Nathaniel Smith [cph, aut], NumPy Team [cph], Python Team [cph]
Maintainer
Matthew Fidler
Repository
CRAN
Date/Publication
2018-04-12 17:03:06 UTC

install.packages('PreciseSums')

0.3

10 days ago

Matthew Fidler

GPL (>= 2)

Depends on

R (>= 3.2)

Suggests

testthat

Discussions