fixedUIntBigNeg
fixedUIntBigNeg(
value,bitWidth,mode?):bigint
Defined in: packages/math-numbers/src/fixed-int-big/fixed-uint-big-neg.ts:18
Negation of a bitWidth-bit unsigned integer, under mode.
Every non-zero input overflows, since the unsigned range holds no negative
value. That is not a degenerate case but the useful one: under wrap this is
the two’s-complement negation hardware performs, so -x is 2 ** bitWidth - x and negating twice returns the original.
Parameters
Section titled “Parameters”bigint
The value to negate.
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 bitWidth
is not a non-negative safe integer.
Throws
Section titled “Throws”When value is
non-zero and mode is abort.