Skip to content

decimalDiv

decimalDiv(a, b, context?): Decimal

Defined in: packages/math-numbers/src/decimal/decimal-div.ts:22

a ÷ b, rounded to the context’s precision.

Division rarely terminates, so the quotient is computed with GUARD_DIGITS_ extra digits and rounded once at the end. Rounding the scaled quotient and then rounding again to the context would double-round.

Readonly<Decimal>

Readonly<Decimal>

Readonly<DecimalContext> = numericConfig.defaultDecimalContext

Decimal

When b is zero, or the context forbids rounding and rounding is required.