Liking cljdoc? Tell your friends :D

fress.impl.bigdec

A minimal, dependency-free arbitrary-precision decimal for ClojureScript, mirroring java.math.BigDecimal: an unscaled js/BigInt value and an integer scale, where the numeric value = unscaled x 10^(-scale).

This is the canonical value produced by the Fressian BIGDEC (0xC7) reader and consumed by the BIGDEC writer — the exact counterpart of JVM Fressian's default BigDecimal support (and the sibling of fress's own bigint handling). Downstream consumers that need decimal arithmetic (e.g. a bignumber.js-backed money type) convert to/from Bigdec via ->unscaled / ->scale / bigdec.

A minimal, dependency-free arbitrary-precision decimal for ClojureScript,
mirroring java.math.BigDecimal: an unscaled `js/BigInt` value and an integer
`scale`, where the numeric value = unscaled x 10^(-scale).

This is the canonical value produced by the Fressian BIGDEC (0xC7) reader and
consumed by the BIGDEC writer — the exact counterpart of JVM Fressian's
default BigDecimal support (and the sibling of fress's own bigint handling).
Downstream consumers that need decimal arithmetic (e.g. a bignumber.js-backed
money type) convert to/from `Bigdec` via `->unscaled` / `->scale` / `bigdec`.
raw docstring

->scalecljs

(->scale bd)

->strcljs

(->str bd)

->unscaledcljs

(->unscaled bd)

bigdeccljs

(bigdec unscaled scale)

Construct a Bigdec from an unscaled js/BigInt and an integer scale.

Construct a Bigdec from an unscaled `js/BigInt` and an integer scale.
raw docstring

bigdec?cljs

(bigdec? x)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close