Trait malachite_base::num::arithmetic::traits::ModShrAssign
source · [−]pub trait ModShrAssign<RHS, M = Self> {
fn mod_shr_assign(&mut self, other: RHS, m: M);
}
Expand description
Left-shifts a number (divides it by a power of 2) modulo another number $m$, in place. Assumes the input is already reduced modulo $m$.
Required Methods
fn mod_shr_assign(&mut self, other: RHS, m: M)
Implementations on Foreign Types
sourceimpl ModShrAssign<i8, u8> for u8
impl ModShrAssign<i8, u8> for u8
sourcefn mod_shr_assign(&mut self, other: i8, m: u8)
fn mod_shr_assign(&mut self, other: i8, m: u8)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i16, u8> for u8
impl ModShrAssign<i16, u8> for u8
sourcefn mod_shr_assign(&mut self, other: i16, m: u8)
fn mod_shr_assign(&mut self, other: i16, m: u8)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i32, u8> for u8
impl ModShrAssign<i32, u8> for u8
sourcefn mod_shr_assign(&mut self, other: i32, m: u8)
fn mod_shr_assign(&mut self, other: i32, m: u8)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i64, u8> for u8
impl ModShrAssign<i64, u8> for u8
sourcefn mod_shr_assign(&mut self, other: i64, m: u8)
fn mod_shr_assign(&mut self, other: i64, m: u8)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i128, u8> for u8
impl ModShrAssign<i128, u8> for u8
sourcefn mod_shr_assign(&mut self, other: i128, m: u8)
fn mod_shr_assign(&mut self, other: i128, m: u8)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<isize, u8> for u8
impl ModShrAssign<isize, u8> for u8
sourcefn mod_shr_assign(&mut self, other: isize, m: u8)
fn mod_shr_assign(&mut self, other: isize, m: u8)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i8, u16> for u16
impl ModShrAssign<i8, u16> for u16
sourcefn mod_shr_assign(&mut self, other: i8, m: u16)
fn mod_shr_assign(&mut self, other: i8, m: u16)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i16, u16> for u16
impl ModShrAssign<i16, u16> for u16
sourcefn mod_shr_assign(&mut self, other: i16, m: u16)
fn mod_shr_assign(&mut self, other: i16, m: u16)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i32, u16> for u16
impl ModShrAssign<i32, u16> for u16
sourcefn mod_shr_assign(&mut self, other: i32, m: u16)
fn mod_shr_assign(&mut self, other: i32, m: u16)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i64, u16> for u16
impl ModShrAssign<i64, u16> for u16
sourcefn mod_shr_assign(&mut self, other: i64, m: u16)
fn mod_shr_assign(&mut self, other: i64, m: u16)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i128, u16> for u16
impl ModShrAssign<i128, u16> for u16
sourcefn mod_shr_assign(&mut self, other: i128, m: u16)
fn mod_shr_assign(&mut self, other: i128, m: u16)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<isize, u16> for u16
impl ModShrAssign<isize, u16> for u16
sourcefn mod_shr_assign(&mut self, other: isize, m: u16)
fn mod_shr_assign(&mut self, other: isize, m: u16)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i8, u32> for u32
impl ModShrAssign<i8, u32> for u32
sourcefn mod_shr_assign(&mut self, other: i8, m: u32)
fn mod_shr_assign(&mut self, other: i8, m: u32)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i16, u32> for u32
impl ModShrAssign<i16, u32> for u32
sourcefn mod_shr_assign(&mut self, other: i16, m: u32)
fn mod_shr_assign(&mut self, other: i16, m: u32)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i32, u32> for u32
impl ModShrAssign<i32, u32> for u32
sourcefn mod_shr_assign(&mut self, other: i32, m: u32)
fn mod_shr_assign(&mut self, other: i32, m: u32)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i64, u32> for u32
impl ModShrAssign<i64, u32> for u32
sourcefn mod_shr_assign(&mut self, other: i64, m: u32)
fn mod_shr_assign(&mut self, other: i64, m: u32)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i128, u32> for u32
impl ModShrAssign<i128, u32> for u32
sourcefn mod_shr_assign(&mut self, other: i128, m: u32)
fn mod_shr_assign(&mut self, other: i128, m: u32)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<isize, u32> for u32
impl ModShrAssign<isize, u32> for u32
sourcefn mod_shr_assign(&mut self, other: isize, m: u32)
fn mod_shr_assign(&mut self, other: isize, m: u32)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i8, u64> for u64
impl ModShrAssign<i8, u64> for u64
sourcefn mod_shr_assign(&mut self, other: i8, m: u64)
fn mod_shr_assign(&mut self, other: i8, m: u64)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i16, u64> for u64
impl ModShrAssign<i16, u64> for u64
sourcefn mod_shr_assign(&mut self, other: i16, m: u64)
fn mod_shr_assign(&mut self, other: i16, m: u64)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i32, u64> for u64
impl ModShrAssign<i32, u64> for u64
sourcefn mod_shr_assign(&mut self, other: i32, m: u64)
fn mod_shr_assign(&mut self, other: i32, m: u64)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i64, u64> for u64
impl ModShrAssign<i64, u64> for u64
sourcefn mod_shr_assign(&mut self, other: i64, m: u64)
fn mod_shr_assign(&mut self, other: i64, m: u64)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i128, u64> for u64
impl ModShrAssign<i128, u64> for u64
sourcefn mod_shr_assign(&mut self, other: i128, m: u64)
fn mod_shr_assign(&mut self, other: i128, m: u64)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<isize, u64> for u64
impl ModShrAssign<isize, u64> for u64
sourcefn mod_shr_assign(&mut self, other: isize, m: u64)
fn mod_shr_assign(&mut self, other: isize, m: u64)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i8, u128> for u128
impl ModShrAssign<i8, u128> for u128
sourcefn mod_shr_assign(&mut self, other: i8, m: u128)
fn mod_shr_assign(&mut self, other: i8, m: u128)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i16, u128> for u128
impl ModShrAssign<i16, u128> for u128
sourcefn mod_shr_assign(&mut self, other: i16, m: u128)
fn mod_shr_assign(&mut self, other: i16, m: u128)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i32, u128> for u128
impl ModShrAssign<i32, u128> for u128
sourcefn mod_shr_assign(&mut self, other: i32, m: u128)
fn mod_shr_assign(&mut self, other: i32, m: u128)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i64, u128> for u128
impl ModShrAssign<i64, u128> for u128
sourcefn mod_shr_assign(&mut self, other: i64, m: u128)
fn mod_shr_assign(&mut self, other: i64, m: u128)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i128, u128> for u128
impl ModShrAssign<i128, u128> for u128
sourcefn mod_shr_assign(&mut self, other: i128, m: u128)
fn mod_shr_assign(&mut self, other: i128, m: u128)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<isize, u128> for u128
impl ModShrAssign<isize, u128> for u128
sourcefn mod_shr_assign(&mut self, other: isize, m: u128)
fn mod_shr_assign(&mut self, other: isize, m: u128)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i8, usize> for usize
impl ModShrAssign<i8, usize> for usize
sourcefn mod_shr_assign(&mut self, other: i8, m: usize)
fn mod_shr_assign(&mut self, other: i8, m: usize)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i16, usize> for usize
impl ModShrAssign<i16, usize> for usize
sourcefn mod_shr_assign(&mut self, other: i16, m: usize)
fn mod_shr_assign(&mut self, other: i16, m: usize)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i32, usize> for usize
impl ModShrAssign<i32, usize> for usize
sourcefn mod_shr_assign(&mut self, other: i32, m: usize)
fn mod_shr_assign(&mut self, other: i32, m: usize)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i64, usize> for usize
impl ModShrAssign<i64, usize> for usize
sourcefn mod_shr_assign(&mut self, other: i64, m: usize)
fn mod_shr_assign(&mut self, other: i64, m: usize)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<i128, usize> for usize
impl ModShrAssign<i128, usize> for usize
sourcefn mod_shr_assign(&mut self, other: i128, m: usize)
fn mod_shr_assign(&mut self, other: i128, m: usize)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.
sourceimpl ModShrAssign<isize, usize> for usize
impl ModShrAssign<isize, usize> for usize
sourcefn mod_shr_assign(&mut self, other: isize, m: usize)
fn mod_shr_assign(&mut self, other: isize, m: usize)
Right-shifts a number (divides it by a power of 2) modulo a number $m$, in place. Assumes the input is already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $\lfloor 2^{-n}x \rfloor \equiv y \mod m$.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is
other.significant_bits()
.
Examples
See here.