Function calcTwosCompLimbCount [src]
Compute the number of limbs required to store a 2s-complement number of bit_count bits.
Special cases bit_count == 0 to return 1. Zero-bit integers can only store the value zero
and this big integer implementation stores zero using one limb.
Prototype
pub fn calcTwosCompLimbCount(bit_count: usize) usize
Parameters
bit_count: usize
Source
pub fn calcTwosCompLimbCount(bit_count: usize) usize {
return @max(std.math.divCeil(usize, bit_count, @bitSizeOf(Limb)) catch unreachable, 1);
}