Package: decimal 0.1.2

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

Authors:Pedro Baltazar [aut, cre, cph], Stefan Krah [ctb, cph]

decimal_0.1.2.tar.gz
decimal_0.1.2.zip(r-4.7-x86_64)decimal_0.1.2.zip(r-4.7-arm64)decimal_0.1.2.zip(r-4.6-x86_64)decimal_0.1.2.zip(r-4.6-arm64)decimal_0.1.2.zip(r-4.5-x86_64)
decimal_0.1.2.tgz(r-4.6-x86_64)decimal_0.1.2.tgz(r-4.6-arm64)decimal_0.1.2.tgz(r-4.5-x86_64)decimal_0.1.2.tgz(r-4.5-arm64)
decimal_0.1.2.tar.gz(r-4.7-arm64)decimal_0.1.2.tar.gz(r-4.7-x86_64)decimal_0.1.2.tar.gz(r-4.6-arm64)decimal_0.1.2.tar.gz(r-4.6-x86_64)
decimal_0.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
decimal/json (API)

# Install 'decimal' in R:
install.packages('decimal', repos = c('https://pedrobtz.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pedrobtz/decimal/issues

Pkgdown/docs site:https://pedrobtz.github.io

On CRAN:

Conda:

5.62 score 4 stars 7 scripts 736 downloads 27 exports 6 dependencies

Last updated from:91a4ca5a92. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK112
linux-devel-x86_64OK123
source / vignettesOK219
linux-release-arm64OK108
linux-release-x86_64OK124
macos-release-arm64OK140
macos-release-x86_64OK260
macos-oldrel-arm64OK92
macos-oldrel-x86_64OK209
windows-devel-arm64OK404
windows-devel-x86_64OK368
windows-release-arm64OK380
windows-release-x86_64OK224
windows-oldrel-x86_64OK233
wasm-releaseOK101

Exports:adjustedarrow_as_data_framearrow_decimal_typeas_decimalclear_decimal_flagsdecimaldecimal_contextdecimal_flagsdecimal_from_doublefmaget_decimal_contextis_decimalis_normalis_qnanis_signedis_snanis_subnormalis_zerolocal_decimal_contextmpdecimal_versionNA_decimal_normalizenumber_classquantizesame_quantumset_decimal_contextwith_decimal_context

Dependencies:cligluelifecyclerlangvctrswithr

Decimal Values
Creating decimal vectors | Scale: how many decimal places? | What about doubles? | Decimals are well-behaved vectors | Base R functions that see the text | In a data.table | Arithmetic | Special values | Rounding and other decimal tools | Where to next

Last update: 2026-11-14
Started: 2026-07-31

Arrow Decimal Types
A name collision to know about | From Arrow to decimal | Scale comes along for free | Nulls become NA | Chunked arrays work the same way | Integer columns | From decimal to Arrow | Pinning the type | Plain fields, and when you want one | Whole tables and Parquet files | Combining parts written separately | Decimal columns written elsewhere | Where the two type systems differ

Last update: 2026-11-14
Started: 2026-09-22

Contexts and Signals
The default context | Changing the context, temporarily | Signals and sticky flags | Reporting signals | Traps: turning signals into errors | Classifying values

Last update: 2026-07-31
Started: 2026-07-31

Readme and manuals

Help Manual

Help pageTopics
Compute the adjusted exponentadjusted
Convert an Arrow table to a data frame, keeping decimal columns exactarrow_as_data_frame
Arrow type for a decimal columnarrow_decimal_type
Convert a vector to decimalas_decimal as_decimal.Array as_decimal.character as_decimal.ChunkedArray as_decimal.decimal as_decimal.default as_decimal.integer as_decimal.numeric
Clear sticky decimal flagsclear_decimal_flags
Construct decimal vectorsdecimal
Arrow interoperabilitydecimal_arrow
Create a decimal arithmetic contextdecimal_context
Read sticky decimal flagsdecimal_flags
Controlled conversion from doubledecimal_from_double
Summaries of decimal vectorsdecimal-summaries max.decimal mean.decimal min.decimal range.decimal Summary.decimal
Fused multiply-addfma
Get the active decimal arithmetic contextget_decimal_context
Test whether an object is a decimal vectoris_decimal
Identify normal decimal valuesis_normal
Identify quiet NaN valuesis_qnan
Identify values with a negative signis_signed
Identify signaling NaN valuesis_snan
Identify subnormal decimal valuesis_subnormal
Identify decimal zerosis_zero
Install a decimal context for the current scopelocal_decimal_context
Report the bundled mpdecimal runtime versionmpdecimal_version
Missing decimal scalarNA_decimal_
Remove unnecessary trailing zerosnormalize
Classify decimal valuesnumber_class
Quantize decimal values to a scalequantize
Compare decimal vector scalessame_quantum
Set the active decimal arithmetic contextset_decimal_context
Summarize a decimal vectorsummary.decimal
Use a decimal context within a blockwith_decimal_context