Module malachite_base::num::arithmetic::mod_power_of_2_is_reduced
source · Expand description
ModPowerOf2IsReduced
, a trait for checking whether a number is
reduced modulo $2^k$.
§mod_power_of_2_is_reduced
use malachite_base::num::arithmetic::traits::ModPowerOf2IsReduced;
assert_eq!(0u8.mod_power_of_2_is_reduced(5), true);
assert_eq!(100u64.mod_power_of_2_is_reduced(5), false);
assert_eq!(100u16.mod_power_of_2_is_reduced(8), true);