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.
Parameters
Section titled “Parameters”Readonly<Decimal>
Readonly<Decimal>
context?
Section titled “context?”Readonly<DecimalContext> = numericConfig.defaultDecimalContext
Returns
Section titled “Returns”Throws
Section titled “Throws”When b is zero, or the context forbids rounding and
rounding is required.