Trait num_modular::ModularSymbols
source · pub trait ModularSymbols<Modulus = Self> {
// Required methods
fn checked_legendre(&self, n: Modulus) -> Option<i8>;
fn checked_jacobi(&self, n: Modulus) -> Option<i8>;
fn kronecker(&self, n: Modulus) -> i8;
// Provided methods
fn legendre(&self, n: Modulus) -> i8 { ... }
fn jacobi(&self, n: Modulus) -> i8 { ... }
}
Expand description
Math symbols related to modular arithmetics
Required Methods§
sourcefn checked_legendre(&self, n: Modulus) -> Option<i8>
fn checked_legendre(&self, n: Modulus) -> Option<i8>
sourcefn checked_jacobi(&self, n: Modulus) -> Option<i8>
fn checked_jacobi(&self, n: Modulus) -> Option<i8>
Calculate Jacobi Symbol (a|n), where a is self
. Returns None if n is negative or even.