crypto_bigint/limb/
bits.rs

1use super::Limb;
2
3impl Limb {
4    /// Calculate the number of bits needed to represent this number.
5    pub const fn bits(self) -> usize {
6        Limb::BIT_SIZE - (self.0.leading_zeros() as usize)
7    }
8}