Trait malachite_base::num::arithmetic::traits::ModIsReduced
source · pub trait ModIsReduced<M = Self> {
fn mod_is_reduced(&self, m: &M) -> bool;
}
Expand description
Checks whether a number is reduced modulo another number $m$.
Required Methods§
fn mod_is_reduced(&self, m: &M) -> bool
Implementations on Foreign Types§
source§impl ModIsReduced<u8> for u8
impl ModIsReduced<u8> for u8
source§fn mod_is_reduced(&self, m: &u8) -> bool
fn mod_is_reduced(&self, m: &u8) -> bool
Returns whether a number is reduced modulo another number $m$; in other words, whether it is less than $m$. $m$ cannot be zero.
$f(x, m) = (x < m)$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if $m$ is 0.
Examples
See here.
source§impl ModIsReduced<u16> for u16
impl ModIsReduced<u16> for u16
source§fn mod_is_reduced(&self, m: &u16) -> bool
fn mod_is_reduced(&self, m: &u16) -> bool
Returns whether a number is reduced modulo another number $m$; in other words, whether it is less than $m$. $m$ cannot be zero.
$f(x, m) = (x < m)$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if $m$ is 0.
Examples
See here.
source§impl ModIsReduced<u32> for u32
impl ModIsReduced<u32> for u32
source§fn mod_is_reduced(&self, m: &u32) -> bool
fn mod_is_reduced(&self, m: &u32) -> bool
Returns whether a number is reduced modulo another number $m$; in other words, whether it is less than $m$. $m$ cannot be zero.
$f(x, m) = (x < m)$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if $m$ is 0.
Examples
See here.
source§impl ModIsReduced<u64> for u64
impl ModIsReduced<u64> for u64
source§fn mod_is_reduced(&self, m: &u64) -> bool
fn mod_is_reduced(&self, m: &u64) -> bool
Returns whether a number is reduced modulo another number $m$; in other words, whether it is less than $m$. $m$ cannot be zero.
$f(x, m) = (x < m)$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if $m$ is 0.
Examples
See here.
source§impl ModIsReduced<u128> for u128
impl ModIsReduced<u128> for u128
source§fn mod_is_reduced(&self, m: &u128) -> bool
fn mod_is_reduced(&self, m: &u128) -> bool
Returns whether a number is reduced modulo another number $m$; in other words, whether it is less than $m$. $m$ cannot be zero.
$f(x, m) = (x < m)$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if $m$ is 0.
Examples
See here.
source§impl ModIsReduced<usize> for usize
impl ModIsReduced<usize> for usize
source§fn mod_is_reduced(&self, m: &usize) -> bool
fn mod_is_reduced(&self, m: &usize) -> bool
Returns whether a number is reduced modulo another number $m$; in other words, whether it is less than $m$. $m$ cannot be zero.
$f(x, m) = (x < m)$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if $m$ is 0.
Examples
See here.