decimal: Exact Arbitrary-Precision Decimal Vectors

Arbitrary-precision vectors with an exact decimal representation, avoiding the rounding surprises of binary floating point. Built on the 'mpdecimal' C library, arithmetic is governed by an explicit decimal context controlling precision, rounding, and signalling, and vectors integrate with 'vctrs' for use in data frames, 'tibble' objects, summaries, and common numeric workflows. Missing values, signed zeros, infinities, and not-a-number values are supported throughout. The arithmetic model follows Cowlishaw (2009) "General Decimal Arithmetic" <https://speleotrove.com/decimal/decarith.html>.

Version: 0.1.0
Depends: R (≥ 4.2.0)
Imports: methods, rlang, vctrs, withr
Suggests: covr, knitr, pillar, rmarkdown, tibble, testthat (≥ 3.0.0)
Published: 2026-08-24
DOI: 10.32614/CRAN.package.decimal (may not be active yet)
Author: Pedro Baltazar [aut, cre, cph], Stefan Krah [ctb, cph] (Vendored 'mpdecimal' library in src/mpdecimal; see inst/COPYRIGHTS.)
Maintainer: Pedro Baltazar <pedrobtz at gmail.com>
License: MIT + file LICENSE
Copyright: see file COPYRIGHTS
NeedsCompilation: yes
Language: en-US
Materials: README, NEWS
CRAN checks: decimal results

Documentation:

Reference manual: decimal.html , decimal.pdf
Vignettes: Contexts and Signals (source, R code)
Decimal Values (source, R code)

Downloads:

Package source: decimal_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

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