Module malachite_base::num::logic::significant_bits
source · Expand description
SignificantBits
, a trait for determining how many significant bits
a number has.
§significant_bits
use malachite_base::num::logic::traits::SignificantBits;
assert_eq!(0u8.significant_bits(), 0);
assert_eq!(100u64.significant_bits(), 7);
assert_eq!(0i8.significant_bits(), 0);
assert_eq!((-100i64).significant_bits(), 7);