Trait malachite_base::num::arithmetic::traits::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§