Function bitNotWrap [src]

r = ~a under 2s complement wrapping semantics. r may alias with a. Assets that r has enough limbs to store the result. The upper bound Limb count is r is calcTwosCompLimbCount(bit_count).

Prototype

pub fn bitNotWrap(r: *Mutable, a: Const, signedness: Signedness, bit_count: usize) void

Parameters

r: *Mutablea: Constsignedness: Signednessbit_count: usize

Source

pub fn bitNotWrap(r: *Mutable, a: Const, signedness: Signedness, bit_count: usize) void { r.copy(a.negate()); const negative_one = Const{ .limbs = &.{1}, .positive = false }; _ = r.addWrap(r.toConst(), negative_one, signedness, bit_count); }