OptionalconversionLimits applied separately to each instance's expression and result conversion caches.
OptionalmaxMaximum exponent before overflow to Infinity. Integer from 0 to Decimal.limits.maxExponent; defaults to Decimal.limits.maxExponent.
OptionalmaxMaximum mantissa digits emitted by a public string-formatting operation. Integer from 1 to Decimal.limits.maxDigits; defaults to 1_000_000.
OptionalmaxMaximum decimal coefficient digits generated while parsing a prefixed number. Integer from 1 to Decimal.limits.maxDigits; defaults to 1_000_000.
OptionalminMinimum exponent before underflow to zero. Integer from -Decimal.limits.maxExponent to 0; defaults to -Decimal.limits.maxExponent.
OptionalmoduloQuotient rounding rule used by mod(). Defaults to 'down', matching JavaScript remainder semantics.
For a.mod(n), the quotient q = a / n is rounded according to the selected
mode, then the remainder is calculated as r = a - n * q.
OptionalparserParser options merged with the parent class's settings.
OptionalprecisionMaximum significant digits in calculation and base-conversion results. Integer from 1 to Decimal.limits.maxDigits; defaults to 20.
OptionalroundingRounding mode used to round to precision when a method does not receive an explicit mode. Defaults to 'half-up'.
OptionaltoExponent at or below which toString uses exponential notation. Integer from -Decimal.limits.maxExponent to 0; defaults to -7.
const SmallExponent = Decimal.clone({ toExpNeg: -5 })
SmallExponent.config.toExpNeg // -5
new SmallExponent('9.999e-4').toString() // '0.0009999'
new SmallExponent('1e-5').toString() // '1e-5'
const AlwaysExponential = Decimal.clone({ toExpNeg: 0 })
new AlwaysExponential('0.5').toString() // '5e-1'
OptionaltoExponent at or above which toString uses exponential notation. Integer from 0 to Decimal.limits.maxExponent; defaults to 21.
Numerical settings and parser options accepted together by Quantity.withConfig().