Skip to content

fixedUIntBigFrom

fixedUIntBigFrom(value, bitWidth, mode?): bigint

Defined in: packages/math-numbers/src/fixed-int-big/fixed-uint-big-from.ts:23

Brings an arbitrary bigint into a bitWidth-bit unsigned integer under mode.

Every unsigned operation in this directory ends here, for the same reason fixedSIntBigFrom collects the signed ones: the exact bigint result cannot overflow, so the policy applies once, at the end.

bigint

The exact value to fit.

number

Width of the integer, in bits.

OverflowMode = numericConfig.defaultOverflowMode

Overflow policy. Defaults to numericConfig.defaultOverflowMode.

bigint

value itself when it already fits, and otherwise the wrapped, clamped or (for abort) never-returned result.

When bitWidth is not a non-negative safe integer.

When value does not fit and mode is abort.