Skip to content

fixedSIntBigShiftLeft

fixedSIntBigShiftLeft(value, count, bitWidth, mode?): bigint

Defined in: packages/math-numbers/src/fixed-int-big/fixed-sint-big-shift-left.ts:22

Left shift of a bitWidth-bit two’s-complement integer, under mode.

The shift happens at full bigint width and the policy applies to the exact result, so a count at or beyond bitWidth is well defined rather than undefined as it is in C: under wrap every bit has left the window and the answer is 0n.

bigint

The value to shift.

number

Bit positions to shift by; non-negative.

number

Width of the integer, in bits.

OverflowMode

Overflow policy. Defaults to numericConfig.defaultOverflowMode.

bigint

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

When the result does not fit and mode is abort.