Trait malachite_base::num::arithmetic::traits::ModMulAssign
source · [−]pub trait ModMulAssign<RHS = Self, M = Self> {
fn mod_mul_assign(&mut self, other: RHS, m: M);
}
Expand description
Multiplies two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.
Required Methods
fn mod_mul_assign(&mut self, other: RHS, m: M)
Implementations on Foreign Types
sourceimpl ModMulAssign<u8, u8> for u8
impl ModMulAssign<u8, u8> for u8
sourcefn 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. Assumes the inputs are 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.
This is equivalent to nmod_mul
from nmod_vec.h
, FLINT 2.7.1, where the result
is assigned to a
.
sourceimpl ModMulAssign<u16, u16> for u16
impl ModMulAssign<u16, u16> for u16
sourcefn 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. Assumes the inputs are 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.
This is equivalent to nmod_mul
from nmod_vec.h
, FLINT 2.7.1, where the result
is assigned to a
.
sourceimpl ModMulAssign<u32, u32> for u32
impl ModMulAssign<u32, u32> for u32
sourcefn 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. Assumes the inputs are 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.
This is equivalent to nmod_mul
from nmod_vec.h
, FLINT 2.7.1, where the result
is assigned to a
.
sourceimpl ModMulAssign<u64, u64> for u64
impl ModMulAssign<u64, u64> for u64
sourcefn 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. Assumes the inputs are 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.
This is equivalent to nmod_mul
from nmod_vec.h
, FLINT 2.7.1, where the result
is assigned to a
.
sourceimpl ModMulAssign<u128, u128> for u128
impl ModMulAssign<u128, u128> for u128
sourcefn 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. Assumes the inputs are 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.
This is equivalent to nmod_mul
from nmod_vec.h
, FLINT 2.7.1, where the result
is assigned to a
.
sourceimpl ModMulAssign<usize, usize> for usize
impl ModMulAssign<usize, usize> for usize
sourcefn 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. Assumes the inputs are 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.
This is equivalent to nmod_mul
from nmod_vec.h
, FLINT 2.7.1, where the result
is assigned to a
.