Function bitCountTwosCompForSignedness [src]
Returns the number of bits required to represent the integer in twos-complement form
with the given signedness.
Prototype
pub fn bitCountTwosCompForSignedness(self: Const, signedness: std.builtin.Signedness) usize Parameters
self: Constsignedness: std.builtin.Signedness Source
pub fn bitCountTwosCompForSignedness(self: Const, signedness: std.builtin.Signedness) usize {
return self.bitCountTwosComp() + @intFromBool(self.positive and signedness == .signed);
}