Trait malachite_base::num::arithmetic::traits::JacobiSymbol
source · pub trait JacobiSymbol<RHS = Self> {
// Required method
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§
source§impl JacobiSymbol for i8
impl JacobiSymbol for i8
source§fn 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.
source§impl JacobiSymbol for i16
impl JacobiSymbol for i16
source§fn 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.
source§impl JacobiSymbol for i32
impl JacobiSymbol for i32
source§fn 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.
source§impl JacobiSymbol for i64
impl JacobiSymbol for i64
source§fn 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.
source§impl JacobiSymbol for i128
impl JacobiSymbol for i128
source§fn 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.
source§impl JacobiSymbol for isize
impl JacobiSymbol for isize
source§fn 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.
source§impl JacobiSymbol for u8
impl JacobiSymbol 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
source§impl JacobiSymbol for u16
impl JacobiSymbol 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
source§impl JacobiSymbol for u32
impl JacobiSymbol 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
source§impl JacobiSymbol for u64
impl JacobiSymbol 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
source§impl JacobiSymbol for u128
impl JacobiSymbol for u128
source§fn jacobi_symbol(self, n: u128) -> i8
fn jacobi_symbol(self, n: u128) -> i8
source§impl JacobiSymbol for usize
impl JacobiSymbol 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.