Module malachite_base::num::arithmetic::eq_mod_power_of_2
source · Expand description
EqModPowerOf2
, a trait for determining whether one number is equal to
another modulo $2^k$.
§eq_mod_power_of_2
use malachite_base::num::arithmetic::traits::EqModPowerOf2;
assert_eq!(0u16.eq_mod_power_of_2(256, 8), true);
assert_eq!((-0b1101i32).eq_mod_power_of_2(0b11011, 3), true);
assert_eq!((-0b1101i64).eq_mod_power_of_2(0b11011, 4), false);