Trait malachite_base::num::arithmetic::traits::ModMulAssign
source · pub trait ModMulAssign<RHS = Self, M = Self> {
// Required method
fn mod_mul_assign(&mut self, other: RHS, m: M);
}
Expand description
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
Required Methods§
fn mod_mul_assign(&mut self, other: RHS, m: M)
Implementations on Foreign Types§
source§impl ModMulAssign for u8
impl ModMulAssign for u8
source§fn mod_mul_assign(&mut self, other: u8, m: u8)
fn mod_mul_assign(&mut self, other: u8, m: u8)
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
$x \gets z$, where $x, y, z < m$ and $xy \equiv z \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
§Panics
Panics if self
or other
are greater than or equal to m
.
This is equivalent to nmod_mul
from nmod.h
, FLINT 2.7.1, where the result is
assigned to a
.
source§impl ModMulAssign for u16
impl ModMulAssign for u16
source§fn mod_mul_assign(&mut self, other: u16, m: u16)
fn mod_mul_assign(&mut self, other: u16, m: u16)
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
$x \gets z$, where $x, y, z < m$ and $xy \equiv z \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
§Panics
Panics if self
or other
are greater than or equal to m
.
This is equivalent to nmod_mul
from nmod.h
, FLINT 2.7.1, where the result is
assigned to a
.
source§impl ModMulAssign for u32
impl ModMulAssign for u32
source§fn mod_mul_assign(&mut self, other: u32, m: u32)
fn mod_mul_assign(&mut self, other: u32, m: u32)
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
$x \gets z$, where $x, y, z < m$ and $xy \equiv z \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
§Panics
Panics if self
or other
are greater than or equal to m
.
This is equivalent to nmod_mul
from nmod.h
, FLINT 2.7.1, where the result is
assigned to a
.
source§impl ModMulAssign for u64
impl ModMulAssign for u64
source§fn mod_mul_assign(&mut self, other: u64, m: u64)
fn mod_mul_assign(&mut self, other: u64, m: u64)
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
$x \gets z$, where $x, y, z < m$ and $xy \equiv z \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
§Panics
Panics if self
or other
are greater than or equal to m
.
This is equivalent to nmod_mul
from nmod.h
, FLINT 2.7.1, where the result is
assigned to a
.
source§impl ModMulAssign for u128
impl ModMulAssign for u128
source§fn mod_mul_assign(&mut self, other: u128, m: u128)
fn mod_mul_assign(&mut self, other: u128, m: u128)
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
$x \gets z$, where $x, y, z < m$ and $xy \equiv z \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
§Panics
Panics if self
or other
are greater than or equal to m
.
This is equivalent to nmod_mul
from nmod.h
, FLINT 2.7.1, where the result is
assigned to a
.
source§impl ModMulAssign for usize
impl ModMulAssign for usize
source§fn mod_mul_assign(&mut self, other: usize, m: usize)
fn mod_mul_assign(&mut self, other: usize, m: usize)
Multiplies two numbers modulo a third number $m$, in place. The inputs must be already reduced modulo $m$.
$x \gets z$, where $x, y, z < m$ and $xy \equiv z \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
§Panics
Panics if self
or other
are greater than or equal to m
.
This is equivalent to nmod_mul
from nmod.h
, FLINT 2.7.1, where the result is
assigned to a
.