pub trait JacobiSymbol<RHS = Self> {
    fn jacobi_symbol(self, other: RHS) -> i8;
}
Expand description

Calculates the Jacobi symbol of two numbers.

Required Methods

Implementations on Foreign Types

Computes the Jacobi 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()).

Panics

Panics if n is even.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even or negative.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even or negative.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even or negative.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even or negative.

Examples

See here.

Computes the Jacobi 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()).

Panics

Panics if n is even or negative.

Examples

See here.

Computes the Jacobi symbol of two u128s.

$$ 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