Trait malachite_base::num::arithmetic::traits::JacobiSymbol
source · [−]pub trait JacobiSymbol<RHS = Self> {
fn jacobi_symbol(self, other: RHS) -> i8;
}
Expand description
Calculates the Jacobi symbol of two numbers.
Required Methods
fn jacobi_symbol(self, other: RHS) -> i8
Implementations on Foreign Types
sourceimpl JacobiSymbol<i8> for i8
impl JacobiSymbol<i8> for i8
sourcefn jacobi_symbol(self, n: i8) -> i8
fn jacobi_symbol(self, n: i8) -> i8
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.
sourceimpl JacobiSymbol<i16> for i16
impl JacobiSymbol<i16> for i16
sourcefn jacobi_symbol(self, n: i16) -> i8
fn jacobi_symbol(self, n: i16) -> i8
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.
sourceimpl JacobiSymbol<i32> for i32
impl JacobiSymbol<i32> for i32
sourcefn jacobi_symbol(self, n: i32) -> i8
fn jacobi_symbol(self, n: i32) -> i8
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.
sourceimpl JacobiSymbol<i64> for i64
impl JacobiSymbol<i64> for i64
sourcefn jacobi_symbol(self, n: i64) -> i8
fn jacobi_symbol(self, n: i64) -> i8
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.
sourceimpl JacobiSymbol<i128> for i128
impl JacobiSymbol<i128> for i128
sourcefn jacobi_symbol(self, n: i128) -> i8
fn jacobi_symbol(self, n: i128) -> i8
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.
sourceimpl JacobiSymbol<isize> for isize
impl JacobiSymbol<isize> for isize
sourcefn jacobi_symbol(self, n: isize) -> i8
fn jacobi_symbol(self, n: isize) -> i8
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.
sourceimpl JacobiSymbol<u8> for u8
impl JacobiSymbol<u8> for u8
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.
fn jacobi_symbol(self, n: u8) -> i8
sourceimpl JacobiSymbol<u16> for u16
impl JacobiSymbol<u16> for u16
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.
fn jacobi_symbol(self, n: u16) -> i8
sourceimpl JacobiSymbol<u32> for u32
impl JacobiSymbol<u32> for u32
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.
fn jacobi_symbol(self, n: u32) -> i8
sourceimpl JacobiSymbol<u64> for u64
impl JacobiSymbol<u64> for u64
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.
fn jacobi_symbol(self, n: u64) -> i8
sourceimpl JacobiSymbol<usize> for usize
impl JacobiSymbol<usize> for usize
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.
fn jacobi_symbol(self, n: usize) -> i8
sourceimpl JacobiSymbol<u128> for u128
impl JacobiSymbol<u128> for u128
sourcefn jacobi_symbol(self, n: u128) -> i8
fn jacobi_symbol(self, n: u128) -> i8
Computes the Jacobi symbol of two u128
s.
$$ 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.