Skip to content

fixedSIntBigRem

fixedSIntBigRem(left, right): bigint

Defined in: packages/math-numbers/src/fixed-int-big/fixed-sint-big-rem.ts:18

Remainder of two bitWidth-bit two’s-complement integers, truncated toward zero — the sign follows the dividend, as C’s % and bigint’s own do.

Takes no overflow mode because it cannot overflow: the magnitude of a remainder is strictly below the divisor’s, so it always fits a type the divisor already fits. It takes no bitWidth for the same reason — nothing here depends on one. That also settles the pair C leaves undefined: the minimum modulo -1 is 0n, not a trap.

There is no unsigned counterpart: with two non-negative operands % has no convention left to pin and cannot overflow either.

bigint

Dividend.

bigint

Divisor.

bigint

When right is zero.