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.

Version: 0.2.6
Depends: R (≥ 4.1)
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), withr
Published: 2026-05-26
DOI: 10.32614/CRAN.package.fpCompare
Author: Alex M Chubaty ORCID iD [aut, cre], His Majesty the King in Right of Canada, as represented by the Minister of Natural Resources Canada [cph]
Maintainer: Alex M Chubaty <achubaty at for-cast.ca>
BugReports: https://github.com/PredictiveEcology/fpCompare/issues
License: GPL-3
URL: https://fpcompare.predictiveecology.org, https://github.com/PredictiveEcology/fpCompare
NeedsCompilation: no
Language: en-CA
Citation: fpCompare citation info
Materials: README, NEWS
CRAN checks: fpCompare results

Documentation:

Reference manual: fpCompare.html , fpCompare.pdf
Vignettes: fpCompare: reliable comparison of floating point numbers (source, R code)

Downloads:

Package source: fpCompare_0.2.6.tar.gz
Windows binaries: r-devel: fpCompare_0.2.4.zip, r-release: fpCompare_0.2.6.zip, r-oldrel: fpCompare_0.2.6.zip
macOS binaries: r-release (arm64): fpCompare_0.2.6.tgz, r-oldrel (arm64): fpCompare_0.2.6.tgz, r-release (x86_64): fpCompare_0.2.6.tgz, r-oldrel (x86_64): fpCompare_0.2.6.tgz
Old sources: fpCompare archive

Reverse dependencies:

Reverse imports: bbssr, intrval, quickPlot, reproducible, SpaDES.tools, twoCoprimary
Reverse suggests: Require

Linking:

Please use the canonical form https://CRAN.R-project.org/package=fpCompare to link to this page.