Trait malachite_base::num::arithmetic::traits::ModShl
source · [−]pub trait ModShl<RHS, M = Self> {
type Output;
fn mod_shl(self, other: RHS, m: M) -> Self::Output;
}
Expand description
Left-shifts a number (multiplies it by a power of 2) modulo another number $m$. Assumes the input is already reduced modulo $m$.
Required Associated Types
Required Methods
Implementations on Foreign Types
sourceimpl ModShl<u8, u8> for u8
impl ModShl<u8, u8> for u8
sourcefn mod_shl(self, other: u8, m: u8) -> u8
fn mod_shl(self, other: u8, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u8
sourceimpl ModShl<u16, u8> for u8
impl ModShl<u16, u8> for u8
sourcefn mod_shl(self, other: u16, m: u8) -> u8
fn mod_shl(self, other: u16, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u8
sourceimpl ModShl<u32, u8> for u8
impl ModShl<u32, u8> for u8
sourcefn mod_shl(self, other: u32, m: u8) -> u8
fn mod_shl(self, other: u32, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u8
sourceimpl ModShl<u64, u8> for u8
impl ModShl<u64, u8> for u8
sourcefn mod_shl(self, other: u64, m: u8) -> u8
fn mod_shl(self, other: u64, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u8
sourceimpl ModShl<u128, u8> for u8
impl ModShl<u128, u8> for u8
sourcefn mod_shl(self, other: u128, m: u8) -> u8
fn mod_shl(self, other: u128, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u8
sourceimpl ModShl<usize, u8> for u8
impl ModShl<usize, u8> for u8
sourcefn mod_shl(self, other: usize, m: u8) -> u8
fn mod_shl(self, other: usize, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u8
sourceimpl ModShl<u8, u16> for u16
impl ModShl<u8, u16> for u16
sourcefn mod_shl(self, other: u8, m: u16) -> u16
fn mod_shl(self, other: u8, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u16
sourceimpl ModShl<u16, u16> for u16
impl ModShl<u16, u16> for u16
sourcefn mod_shl(self, other: u16, m: u16) -> u16
fn mod_shl(self, other: u16, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u16
sourceimpl ModShl<u32, u16> for u16
impl ModShl<u32, u16> for u16
sourcefn mod_shl(self, other: u32, m: u16) -> u16
fn mod_shl(self, other: u32, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u16
sourceimpl ModShl<u64, u16> for u16
impl ModShl<u64, u16> for u16
sourcefn mod_shl(self, other: u64, m: u16) -> u16
fn mod_shl(self, other: u64, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u16
sourceimpl ModShl<u128, u16> for u16
impl ModShl<u128, u16> for u16
sourcefn mod_shl(self, other: u128, m: u16) -> u16
fn mod_shl(self, other: u128, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u16
sourceimpl ModShl<usize, u16> for u16
impl ModShl<usize, u16> for u16
sourcefn mod_shl(self, other: usize, m: u16) -> u16
fn mod_shl(self, other: usize, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u16
sourceimpl ModShl<u8, u32> for u32
impl ModShl<u8, u32> for u32
sourcefn mod_shl(self, other: u8, m: u32) -> u32
fn mod_shl(self, other: u8, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u32
sourceimpl ModShl<u16, u32> for u32
impl ModShl<u16, u32> for u32
sourcefn mod_shl(self, other: u16, m: u32) -> u32
fn mod_shl(self, other: u16, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u32
sourceimpl ModShl<u32, u32> for u32
impl ModShl<u32, u32> for u32
sourcefn mod_shl(self, other: u32, m: u32) -> u32
fn mod_shl(self, other: u32, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u32
sourceimpl ModShl<u64, u32> for u32
impl ModShl<u64, u32> for u32
sourcefn mod_shl(self, other: u64, m: u32) -> u32
fn mod_shl(self, other: u64, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u32
sourceimpl ModShl<u128, u32> for u32
impl ModShl<u128, u32> for u32
sourcefn mod_shl(self, other: u128, m: u32) -> u32
fn mod_shl(self, other: u128, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u32
sourceimpl ModShl<usize, u32> for u32
impl ModShl<usize, u32> for u32
sourcefn mod_shl(self, other: usize, m: u32) -> u32
fn mod_shl(self, other: usize, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u32
sourceimpl ModShl<u8, u64> for u64
impl ModShl<u8, u64> for u64
sourcefn mod_shl(self, other: u8, m: u64) -> u64
fn mod_shl(self, other: u8, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u64
sourceimpl ModShl<u16, u64> for u64
impl ModShl<u16, u64> for u64
sourcefn mod_shl(self, other: u16, m: u64) -> u64
fn mod_shl(self, other: u16, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u64
sourceimpl ModShl<u32, u64> for u64
impl ModShl<u32, u64> for u64
sourcefn mod_shl(self, other: u32, m: u64) -> u64
fn mod_shl(self, other: u32, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u64
sourceimpl ModShl<u64, u64> for u64
impl ModShl<u64, u64> for u64
sourcefn mod_shl(self, other: u64, m: u64) -> u64
fn mod_shl(self, other: u64, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u64
sourceimpl ModShl<u128, u64> for u64
impl ModShl<u128, u64> for u64
sourcefn mod_shl(self, other: u128, m: u64) -> u64
fn mod_shl(self, other: u128, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u64
sourceimpl ModShl<usize, u64> for u64
impl ModShl<usize, u64> for u64
sourcefn mod_shl(self, other: usize, m: u64) -> u64
fn mod_shl(self, other: usize, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u64
sourceimpl ModShl<u8, u128> for u128
impl ModShl<u8, u128> for u128
sourcefn mod_shl(self, other: u8, m: u128) -> u128
fn mod_shl(self, other: u8, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u128
sourceimpl ModShl<u16, u128> for u128
impl ModShl<u16, u128> for u128
sourcefn mod_shl(self, other: u16, m: u128) -> u128
fn mod_shl(self, other: u16, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u128
sourceimpl ModShl<u32, u128> for u128
impl ModShl<u32, u128> for u128
sourcefn mod_shl(self, other: u32, m: u128) -> u128
fn mod_shl(self, other: u32, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u128
sourceimpl ModShl<u64, u128> for u128
impl ModShl<u64, u128> for u128
sourcefn mod_shl(self, other: u64, m: u128) -> u128
fn mod_shl(self, other: u64, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u128
sourceimpl ModShl<u128, u128> for u128
impl ModShl<u128, u128> for u128
sourcefn mod_shl(self, other: u128, m: u128) -> u128
fn mod_shl(self, other: u128, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u128
sourceimpl ModShl<usize, u128> for u128
impl ModShl<usize, u128> for u128
sourcefn mod_shl(self, other: usize, m: u128) -> u128
fn mod_shl(self, other: usize, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = u128
sourceimpl ModShl<u8, usize> for usize
impl ModShl<u8, usize> for usize
sourcefn mod_shl(self, other: u8, m: usize) -> usize
fn mod_shl(self, other: u8, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = usize
sourceimpl ModShl<u16, usize> for usize
impl ModShl<u16, usize> for usize
sourcefn mod_shl(self, other: u16, m: usize) -> usize
fn mod_shl(self, other: u16, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = usize
sourceimpl ModShl<u32, usize> for usize
impl ModShl<u32, usize> for usize
sourcefn mod_shl(self, other: u32, m: usize) -> usize
fn mod_shl(self, other: u32, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = usize
sourceimpl ModShl<u64, usize> for usize
impl ModShl<u64, usize> for usize
sourcefn mod_shl(self, other: u64, m: usize) -> usize
fn mod_shl(self, other: u64, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = usize
sourceimpl ModShl<u128, usize> for usize
impl ModShl<u128, usize> for usize
sourcefn mod_shl(self, other: u128, m: usize) -> usize
fn mod_shl(self, other: u128, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = usize
sourceimpl ModShl<usize, usize> for usize
impl ModShl<usize, usize> for usize
sourcefn mod_shl(self, other: usize, m: usize) -> usize
fn mod_shl(self, other: usize, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $2^nx \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.
type Output = usize
sourceimpl ModShl<i8, u8> for u8
impl ModShl<i8, u8> for u8
sourcefn mod_shl(self, other: i8, m: u8) -> u8
fn mod_shl(self, other: i8, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u8
sourceimpl ModShl<i16, u8> for u8
impl ModShl<i16, u8> for u8
sourcefn mod_shl(self, other: i16, m: u8) -> u8
fn mod_shl(self, other: i16, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u8
sourceimpl ModShl<i32, u8> for u8
impl ModShl<i32, u8> for u8
sourcefn mod_shl(self, other: i32, m: u8) -> u8
fn mod_shl(self, other: i32, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u8
sourceimpl ModShl<i64, u8> for u8
impl ModShl<i64, u8> for u8
sourcefn mod_shl(self, other: i64, m: u8) -> u8
fn mod_shl(self, other: i64, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u8
sourceimpl ModShl<i128, u8> for u8
impl ModShl<i128, u8> for u8
sourcefn mod_shl(self, other: i128, m: u8) -> u8
fn mod_shl(self, other: i128, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u8
sourceimpl ModShl<isize, u8> for u8
impl ModShl<isize, u8> for u8
sourcefn mod_shl(self, other: isize, m: u8) -> u8
fn mod_shl(self, other: isize, m: u8) -> u8
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u8
sourceimpl ModShl<i8, u16> for u16
impl ModShl<i8, u16> for u16
sourcefn mod_shl(self, other: i8, m: u16) -> u16
fn mod_shl(self, other: i8, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u16
sourceimpl ModShl<i16, u16> for u16
impl ModShl<i16, u16> for u16
sourcefn mod_shl(self, other: i16, m: u16) -> u16
fn mod_shl(self, other: i16, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u16
sourceimpl ModShl<i32, u16> for u16
impl ModShl<i32, u16> for u16
sourcefn mod_shl(self, other: i32, m: u16) -> u16
fn mod_shl(self, other: i32, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u16
sourceimpl ModShl<i64, u16> for u16
impl ModShl<i64, u16> for u16
sourcefn mod_shl(self, other: i64, m: u16) -> u16
fn mod_shl(self, other: i64, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u16
sourceimpl ModShl<i128, u16> for u16
impl ModShl<i128, u16> for u16
sourcefn mod_shl(self, other: i128, m: u16) -> u16
fn mod_shl(self, other: i128, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u16
sourceimpl ModShl<isize, u16> for u16
impl ModShl<isize, u16> for u16
sourcefn mod_shl(self, other: isize, m: u16) -> u16
fn mod_shl(self, other: isize, m: u16) -> u16
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u16
sourceimpl ModShl<i8, u32> for u32
impl ModShl<i8, u32> for u32
sourcefn mod_shl(self, other: i8, m: u32) -> u32
fn mod_shl(self, other: i8, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u32
sourceimpl ModShl<i16, u32> for u32
impl ModShl<i16, u32> for u32
sourcefn mod_shl(self, other: i16, m: u32) -> u32
fn mod_shl(self, other: i16, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u32
sourceimpl ModShl<i32, u32> for u32
impl ModShl<i32, u32> for u32
sourcefn mod_shl(self, other: i32, m: u32) -> u32
fn mod_shl(self, other: i32, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u32
sourceimpl ModShl<i64, u32> for u32
impl ModShl<i64, u32> for u32
sourcefn mod_shl(self, other: i64, m: u32) -> u32
fn mod_shl(self, other: i64, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u32
sourceimpl ModShl<i128, u32> for u32
impl ModShl<i128, u32> for u32
sourcefn mod_shl(self, other: i128, m: u32) -> u32
fn mod_shl(self, other: i128, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u32
sourceimpl ModShl<isize, u32> for u32
impl ModShl<isize, u32> for u32
sourcefn mod_shl(self, other: isize, m: u32) -> u32
fn mod_shl(self, other: isize, m: u32) -> u32
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u32
sourceimpl ModShl<i8, u64> for u64
impl ModShl<i8, u64> for u64
sourcefn mod_shl(self, other: i8, m: u64) -> u64
fn mod_shl(self, other: i8, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u64
sourceimpl ModShl<i16, u64> for u64
impl ModShl<i16, u64> for u64
sourcefn mod_shl(self, other: i16, m: u64) -> u64
fn mod_shl(self, other: i16, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u64
sourceimpl ModShl<i32, u64> for u64
impl ModShl<i32, u64> for u64
sourcefn mod_shl(self, other: i32, m: u64) -> u64
fn mod_shl(self, other: i32, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u64
sourceimpl ModShl<i64, u64> for u64
impl ModShl<i64, u64> for u64
sourcefn mod_shl(self, other: i64, m: u64) -> u64
fn mod_shl(self, other: i64, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u64
sourceimpl ModShl<i128, u64> for u64
impl ModShl<i128, u64> for u64
sourcefn mod_shl(self, other: i128, m: u64) -> u64
fn mod_shl(self, other: i128, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u64
sourceimpl ModShl<isize, u64> for u64
impl ModShl<isize, u64> for u64
sourcefn mod_shl(self, other: isize, m: u64) -> u64
fn mod_shl(self, other: isize, m: u64) -> u64
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u64
sourceimpl ModShl<i8, u128> for u128
impl ModShl<i8, u128> for u128
sourcefn mod_shl(self, other: i8, m: u128) -> u128
fn mod_shl(self, other: i8, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u128
sourceimpl ModShl<i16, u128> for u128
impl ModShl<i16, u128> for u128
sourcefn mod_shl(self, other: i16, m: u128) -> u128
fn mod_shl(self, other: i16, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u128
sourceimpl ModShl<i32, u128> for u128
impl ModShl<i32, u128> for u128
sourcefn mod_shl(self, other: i32, m: u128) -> u128
fn mod_shl(self, other: i32, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u128
sourceimpl ModShl<i64, u128> for u128
impl ModShl<i64, u128> for u128
sourcefn mod_shl(self, other: i64, m: u128) -> u128
fn mod_shl(self, other: i64, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u128
sourceimpl ModShl<i128, u128> for u128
impl ModShl<i128, u128> for u128
sourcefn mod_shl(self, other: i128, m: u128) -> u128
fn mod_shl(self, other: i128, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u128
sourceimpl ModShl<isize, u128> for u128
impl ModShl<isize, u128> for u128
sourcefn mod_shl(self, other: isize, m: u128) -> u128
fn mod_shl(self, other: isize, m: u128) -> u128
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = u128
sourceimpl ModShl<i8, usize> for usize
impl ModShl<i8, usize> for usize
sourcefn mod_shl(self, other: i8, m: usize) -> usize
fn mod_shl(self, other: i8, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = usize
sourceimpl ModShl<i16, usize> for usize
impl ModShl<i16, usize> for usize
sourcefn mod_shl(self, other: i16, m: usize) -> usize
fn mod_shl(self, other: i16, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = usize
sourceimpl ModShl<i32, usize> for usize
impl ModShl<i32, usize> for usize
sourcefn mod_shl(self, other: i32, m: usize) -> usize
fn mod_shl(self, other: i32, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = usize
sourceimpl ModShl<i64, usize> for usize
impl ModShl<i64, usize> for usize
sourcefn mod_shl(self, other: i64, m: usize) -> usize
fn mod_shl(self, other: i64, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = usize
sourceimpl ModShl<i128, usize> for usize
impl ModShl<i128, usize> for usize
sourcefn mod_shl(self, other: i128, m: usize) -> usize
fn mod_shl(self, other: i128, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.
type Output = usize
sourceimpl ModShl<isize, usize> for usize
impl ModShl<isize, usize> for usize
sourcefn mod_shl(self, other: isize, m: usize) -> usize
fn mod_shl(self, other: isize, m: usize) -> usize
Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. Assumes the input is already reduced modulo $m$.
$f(x, n, m) = y$, where $x, y < m$ and $\lfloor 2^nx \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.