Module malachite_base::num::arithmetic::mod_inverse
source · Expand description
ModInverse
, a trait for finding the multiplicative inverse of a number
modulo another number.
§mod_inverse
use malachite_base::num::arithmetic::traits::ModInverse;
assert_eq!(7u8.mod_inverse(10), Some(3));
assert_eq!(8u8.mod_inverse(10), None);
assert_eq!(123u32.mod_inverse(4567), Some(854));