Trait malachite_base::num::arithmetic::traits::ModIsReduced

source ·
pub trait ModIsReduced<M = Self> {
    // Required method
    fn mod_is_reduced(&self, m: &M) -> bool;
}
Expand description

Checks whether a number is reduced modulo another number $m$.

Required Methods§

source

fn mod_is_reduced(&self, m: &M) -> bool

Implementations on Foreign Types§

source§

impl ModIsReduced for u8

source§

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 for u16

source§

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 for u32

source§

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 for u64

source§

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 for u128

source§

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 for usize

source§

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.

Implementors§