Trait num_modular::ModularUnaryOps
source · [−]pub trait ModularUnaryOps<Modulus = Self> {
type Output;
fn negm(self, m: Modulus) -> Self::Output;
fn invm(self, m: Modulus) -> Option<Self::Output>;
}
Expand description
Core unary modular arithmetics
Note that all functions will panic if the modulus is zero.
Associated Types
Required methods
Return (-self) % m and make sure the result is normalized in range [0,m)