fixedSIntBigDiv
fixedSIntBigDiv(
left,right,bitWidth,mode?):bigint
Defined in: packages/math-numbers/src/fixed-int-big/fixed-sint-big-div.ts:27
Quotient of two bitWidth-bit two’s-complement integers, truncated toward
zero, under mode.
Division overflows for exactly one pair — the minimum over -1, whose exact
quotient is one past the maximum. Division by zero is not overflow but an
undefined operation, so it throws RangeError whatever mode says.
There is no unsigned counterpart: an unsigned quotient of two in-range values
is never larger than the dividend, so it cannot overflow and would be
bigIntDivTrunc under another name.
Parameters
Section titled “Parameters”bigint
Dividend.
bigint
Divisor.
bitWidth
Section titled “bitWidth”number
Width of the integer, in bits.
Overflow policy. Defaults to
numericConfig.defaultOverflowMode.
Returns
Section titled “Returns”bigint
Throws
Section titled “Throws”When right is zero, or bitWidth is not a
non-negative safe integer.
Throws
Section titled “Throws”When the quotient does not fit and mode is abort.