inv_mod
Returns s
the inverse of a
modulo n
such that as
≡ 1 modulo n
, or None if gcd(a, n) > 1
. s
is guaranteed to be between 1
and n - 1
(inclusive).
Fully qualified path: core::math::inv_mod
pub fn inv_mod<
T,
+Copy<T>,
+Drop<T>,
+Add<T>,
+Sub<T>,
+Mul<T>,
+DivRem<T>,
+core::num::traits::Zero<T>,
+core::num::traits::One<T>,
+TryInto<T, NonZero<T>>,
>(
a: NonZero<T>, n: NonZero<T>,
) -> Option<T>