Skip to content

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.

bigint

Dividend.

bigint

Divisor.

number

Width of the integer, in bits.

OverflowMode

Overflow policy. Defaults to numericConfig.defaultOverflowMode.

bigint

When right is zero, or bitWidth is not a non-negative safe integer.

When the quotient does not fit and mode is abort.