Trait KroneckerSymbol

Source
pub trait KroneckerSymbol<RHS = Self> {
    // Required method
    fn kronecker_symbol(self, other: RHS) -> i8;
}
Expand description

Calculates the Kronecker symbol of two numbers.

Required Methods§

Source

fn kronecker_symbol(self, other: RHS) -> i8

Implementations on Foreign Types§

Source§

impl KroneckerSymbol for i8

Source§

fn kronecker_symbol(self, n: i8) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for i16

Source§

fn kronecker_symbol(self, n: i16) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for i32

Source§

fn kronecker_symbol(self, n: i32) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for i64

Source§

fn kronecker_symbol(self, n: i64) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for i128

Source§

fn kronecker_symbol(self, n: i128) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for isize

Source§

fn kronecker_symbol(self, n: isize) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for u8

Source§

fn kronecker_symbol(self, n: u8) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for u16

Source§

fn kronecker_symbol(self, n: u16) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for u32

Source§

fn kronecker_symbol(self, n: u32) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for u64

Source§

fn kronecker_symbol(self, n: u64) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for u128

Source§

fn kronecker_symbol(self, n: u128) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Source§

impl KroneckerSymbol for usize

Source§

fn kronecker_symbol(self, n: usize) -> i8

Computes the Kronecker symbol of two numbers.

$$ f(x, y) = \left ( \frac{x}{y} \right ). $$

§Worst-case complexity

$T(n) = O(n^2)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is max(self.significant_bits(), other.significant_bits()).

§Examples

See here.

Implementors§