StaticcloneCreate an independently configurable constructor for this tier.
Create an independently configurable arithmetic constructor.
Optionalconfig: Partial<DecimalConfig>StaticmaxSelect the greatest value from an iterable or scalar inputs.
Select the greatest value from a non-empty iterable.
Select the greatest of one or more scalar values.
StaticminSelect the least value from an iterable or scalar inputs.
Select the least value from a non-empty iterable.
Select the least of one or more scalar values.
StaticconfigRead a frozen snapshot of this constructor's active configuration.
Apply a validated partial configuration update to this constructor.
StaticlimitsHard validation limits shared by every Decimal tier.
Convert according to JavaScript's primitive hint.
Return the absolute value.
Round to an integer toward positive Infinity.
Divide by a value using the active precision and rounding mode.
Divide by a value and truncate the quotient toward zero.
The number of digits after the decimal point, or NaN for a non-finite value.
Round to an integer toward negative Infinity.
Whether this value is a finite even integer.
Whether this value is finite.
Whether this value is a finite integer.
Whether this value is NaN.
Whether this value has a negative sign.
Whether this value is a finite odd integer.
Whether this value has a positive sign.
Whether this value is positive or negative zero.
Calculate a remainder using the configured modulo mode.
Return a new Decimal with the sign inverted.
Raise to a safe integer Number exponent, rounding only the final result. Negative exponents calculate reciprocals. Invalid exponents throw INVALID_ARGUMENT.
Count this value's significant digits.
OptionalincludeTrailingIntegerZeros: booleanRound to an integer using the configured rounding mode.
-1, -0, 0, 1, or NaN according to this value's state.
Estimate the bytes used by this value's stored numeric state.
The estimate counts the coefficient reference, exponent, sign, and each base-1e7 coefficient word as one eight-byte slot. It excludes engine-dependent object and array headers, alignment, private-field metadata, and shared prototype data.
Round to a maximum number of decimal places.
Optionaldp: numberOptionalrm: RoundingModeFormat this value in exponential notation.
Optionaldp: numberOptionalrm: RoundingModeFormat this value in fixed-point notation.
Optionaldp: numberOptionalrm: RoundingModeApproximate this value as a fraction.
Optionaldenominator: DecimalValueReturn the exact string serialized by JSON.
Round to a multiple of another value.
Optionalvalue: DecimalValueOptionalrm: RoundingModeConvert to the nearest JavaScript number.
Format this value to a specified number of significant digits.
Optionalsd: numberOptionalrm: RoundingModeReturn an owned immutable exact rational term with denominator 1 and a normalized numerator. Independent of calculation and formatting settings. Both zero signs produce numerator 0. NaN and infinities throw INVALID_ARGUMENT.
Round to a maximum number of significant digits.
Optionalsd: numberOptionalrm: RoundingModeFormat this value in canonical fixed or exponential notation.
Return the exact primitive string value, preserving negative zero.
Truncate to an integer toward zero.
Return the exact string used by default JavaScript coercion.
StaticcompareCompare an exact rational sum with zero, returning -1, 0 or 1. Precision, rounding, exponent and formatting settings do not affect the comparison. Terms have the same validation and resource limits as fromRationalSum. Empty, all-zero and exactly cancelling inputs return +0.
StaticfromConstruct a sum of exact rational terms, rounding once using this constructor's settings. Terms represent numerator / denominator times ten to exponent. Denominators must be positive. Empty or all-zero inputs produce +0; nonzero cancellation produces -0 only with floor rounding. Invalid terms or non-iterable input throw INVALID_ARGUMENT.
The core Decimal representation plus arithmetic and rounding operations. Integer powers are included; import the scientific tier for general powers, logarithms, and trigonometry.