pub trait ModularCoreOps<Rhs = Self, Modulus = Self> {
    type Output;
    fn addm(self, rhs: Rhs, m: Modulus) -> Self::Output;
fn subm(self, rhs: Rhs, m: Modulus) -> Self::Output;
fn mulm(self, rhs: Rhs, m: Modulus) -> Self::Output;
fn negm(self, m: Modulus) -> Self::Output; }
Expand description

This trait describes core modular arithmetic operations

Associated Types

Required methods

Return (self + rhs) % m

Return (self + rhs) % m

Return (self * rhs) % m

Return (-self) % m and make sure the result is normalized in range [0,m)

Implementations on Foreign Types

Implementors