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