Trait malachite_base::num::arithmetic::traits::ModShl

source ·
pub trait ModShl<RHS, M = Self> {
    type Output;

    // Required method
    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$. The number must be already reduced modulo $m$.

Required Associated Types§

Required Methods§

source

fn mod_shl(self, other: RHS, m: M) -> Self::Output

Implementations on Foreign Types§

source§

impl ModShl<i8> for u8

source§

fn mod_shl(self, other: i8, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<i8> for u16

source§

fn mod_shl(self, other: i8, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<i8> for u32

source§

fn mod_shl(self, other: i8, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<i8> for u64

source§

fn mod_shl(self, other: i8, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<i8> for u128

source§

fn mod_shl(self, other: i8, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<i8> for usize

source§

fn mod_shl(self, other: i8, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<i16> for u8

source§

fn mod_shl(self, other: i16, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<i16> for u16

source§

fn mod_shl(self, other: i16, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<i16> for u32

source§

fn mod_shl(self, other: i16, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<i16> for u64

source§

fn mod_shl(self, other: i16, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<i16> for u128

source§

fn mod_shl(self, other: i16, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<i16> for usize

source§

fn mod_shl(self, other: i16, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<i32> for u8

source§

fn mod_shl(self, other: i32, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<i32> for u16

source§

fn mod_shl(self, other: i32, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<i32> for u32

source§

fn mod_shl(self, other: i32, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<i32> for u64

source§

fn mod_shl(self, other: i32, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<i32> for u128

source§

fn mod_shl(self, other: i32, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<i32> for usize

source§

fn mod_shl(self, other: i32, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<i64> for u8

source§

fn mod_shl(self, other: i64, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<i64> for u16

source§

fn mod_shl(self, other: i64, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<i64> for u32

source§

fn mod_shl(self, other: i64, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<i64> for u64

source§

fn mod_shl(self, other: i64, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<i64> for u128

source§

fn mod_shl(self, other: i64, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<i64> for usize

source§

fn mod_shl(self, other: i64, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<i128> for u8

source§

fn mod_shl(self, other: i128, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<i128> for u16

source§

fn mod_shl(self, other: i128, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<i128> for u32

source§

fn mod_shl(self, other: i128, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<i128> for u64

source§

fn mod_shl(self, other: i128, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<i128> for u128

source§

fn mod_shl(self, other: i128, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<i128> for usize

source§

fn mod_shl(self, other: i128, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<isize> for u8

source§

fn mod_shl(self, other: isize, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<isize> for u16

source§

fn mod_shl(self, other: isize, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<isize> for u32

source§

fn mod_shl(self, other: isize, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<isize> for u64

source§

fn mod_shl(self, other: isize, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<isize> for u128

source§

fn mod_shl(self, other: isize, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<isize> for usize

source§

fn mod_shl(self, other: isize, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<u8> for u8

source§

fn mod_shl(self, other: u8, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<u8> for u16

source§

fn mod_shl(self, other: u8, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<u8> for u32

source§

fn mod_shl(self, other: u8, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<u8> for u64

source§

fn mod_shl(self, other: u8, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<u8> for u128

source§

fn mod_shl(self, other: u8, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<u8> for usize

source§

fn mod_shl(self, other: u8, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<u16> for u8

source§

fn mod_shl(self, other: u16, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<u16> for u16

source§

fn mod_shl(self, other: u16, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<u16> for u32

source§

fn mod_shl(self, other: u16, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<u16> for u64

source§

fn mod_shl(self, other: u16, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<u16> for u128

source§

fn mod_shl(self, other: u16, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<u16> for usize

source§

fn mod_shl(self, other: u16, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<u32> for u8

source§

fn mod_shl(self, other: u32, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<u32> for u16

source§

fn mod_shl(self, other: u32, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<u32> for u32

source§

fn mod_shl(self, other: u32, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<u32> for u64

source§

fn mod_shl(self, other: u32, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<u32> for u128

source§

fn mod_shl(self, other: u32, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<u32> for usize

source§

fn mod_shl(self, other: u32, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<u64> for u8

source§

fn mod_shl(self, other: u64, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<u64> for u16

source§

fn mod_shl(self, other: u64, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<u64> for u32

source§

fn mod_shl(self, other: u64, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<u64> for u64

source§

fn mod_shl(self, other: u64, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<u64> for u128

source§

fn mod_shl(self, other: u64, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<u64> for usize

source§

fn mod_shl(self, other: u64, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<u128> for u8

source§

fn mod_shl(self, other: u128, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<u128> for u16

source§

fn mod_shl(self, other: u128, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<u128> for u32

source§

fn mod_shl(self, other: u128, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<u128> for u64

source§

fn mod_shl(self, other: u128, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<u128> for u128

source§

fn mod_shl(self, other: u128, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<u128> for usize

source§

fn mod_shl(self, other: u128, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

source§

impl ModShl<usize> for u8

source§

fn mod_shl(self, other: usize, m: u8) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u8

source§

impl ModShl<usize> for u16

source§

fn mod_shl(self, other: usize, m: u16) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u16

source§

impl ModShl<usize> for u32

source§

fn mod_shl(self, other: usize, m: u32) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u32

source§

impl ModShl<usize> for u64

source§

fn mod_shl(self, other: usize, m: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u64

source§

impl ModShl<usize> for u128

source§

fn mod_shl(self, other: usize, m: u128) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = u128

source§

impl ModShl<usize> for usize

source§

fn mod_shl(self, other: usize, m: usize) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo a number $m$. The number must be 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().

§Panics

Panics if self is greater than or equal to m.

§Examples

See here.

§

type Output = usize

Implementors§