Skip to content

PreciseSums

Accurate Floating Point Sums and Products

v0.7 · Sep 17, 2024 · GPL (>= 2)

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 <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.

Downloads

CRAN

1.8K

Last 30 days

2833rd

5.1K

Last 90 days

29.6K

Last year

Trend: +1.6% (30d vs prior 30d)

r2u CRAN

161

Last 30 days

349

Last 90 days

819

Last year

Trend: +85.1% (30d vs prior 30d)

autoCRAN

0

Last 7 days

15

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (2)

imports

linking_to

Dependency Network

Dependencies Reverse dependencies ciuupi2 rxode2 PreciseSums

Version History

7 tracked
new 0.7 Mar 10, 2026
updated 0.7 ← 0.6 diff Sep 17, 2024
updated 0.6 ← 0.5 diff Apr 21, 2023
updated 0.5 ← 0.4 diff Apr 21, 2022
updated 0.4 ← 0.3 diff Jul 9, 2020
updated 0.3 ← 0.1 diff Apr 11, 2018
new 0.1 Nov 13, 2017