Crandore Hub

fpCompare

Reliable Comparison of Floating Point Numbers

Comparisons of floating point numbers are problematic due to errors associated with the binary representation of decimal numbers. Despite being aware of these problems, people still use numerical methods that fail to account for these and other rounding errors (this pitfall is the first to be highlighted in Circle 1 of Burns (2012) 'The R Inferno' <https://www.burns-stat.com/pages/Tutor/R_inferno.pdf>). This package provides new relational operators useful for performing floating point number comparisons with a set tolerance.

Versions across snapshots

VersionRepositoryFileSize
0.2.4 2026-04-09 windows/windows R-4.5 fpCompare_0.2.4.zip 24.7 KiB

Dependencies (latest)

Suggests