Trait malachite_base::num::arithmetic::traits::ModPowerOf2Shl

source ·
pub trait ModPowerOf2Shl<RHS> {
    type Output;

    // Required method
    fn mod_power_of_2_shl(self, other: RHS, pow: u64) -> Self::Output;
}
Expand description

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

Required Associated Types§

Required Methods§

source

fn mod_power_of_2_shl(self, other: RHS, pow: u64) -> Self::Output

Implementations on Foreign Types§

source§

impl ModPowerOf2Shl<i8> for u8

source§

fn mod_power_of_2_shl(self, other: i8, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<i8> for u16

source§

fn mod_power_of_2_shl(self, other: i8, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<i8> for u32

source§

fn mod_power_of_2_shl(self, other: i8, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<i8> for u64

source§

fn mod_power_of_2_shl(self, other: i8, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<i8> for u128

source§

fn mod_power_of_2_shl(self, other: i8, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<i8> for usize

source§

fn mod_power_of_2_shl(self, other: i8, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<i16> for u8

source§

fn mod_power_of_2_shl(self, other: i16, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<i16> for u16

source§

fn mod_power_of_2_shl(self, other: i16, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<i16> for u32

source§

fn mod_power_of_2_shl(self, other: i16, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<i16> for u64

source§

fn mod_power_of_2_shl(self, other: i16, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<i16> for u128

source§

fn mod_power_of_2_shl(self, other: i16, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<i16> for usize

source§

fn mod_power_of_2_shl(self, other: i16, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<i32> for u8

source§

fn mod_power_of_2_shl(self, other: i32, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<i32> for u16

source§

fn mod_power_of_2_shl(self, other: i32, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<i32> for u32

source§

fn mod_power_of_2_shl(self, other: i32, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<i32> for u64

source§

fn mod_power_of_2_shl(self, other: i32, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<i32> for u128

source§

fn mod_power_of_2_shl(self, other: i32, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<i32> for usize

source§

fn mod_power_of_2_shl(self, other: i32, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<i64> for u8

source§

fn mod_power_of_2_shl(self, other: i64, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<i64> for u16

source§

fn mod_power_of_2_shl(self, other: i64, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<i64> for u32

source§

fn mod_power_of_2_shl(self, other: i64, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<i64> for u64

source§

fn mod_power_of_2_shl(self, other: i64, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<i64> for u128

source§

fn mod_power_of_2_shl(self, other: i64, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<i64> for usize

source§

fn mod_power_of_2_shl(self, other: i64, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<i128> for u8

source§

fn mod_power_of_2_shl(self, other: i128, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<i128> for u16

source§

fn mod_power_of_2_shl(self, other: i128, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<i128> for u32

source§

fn mod_power_of_2_shl(self, other: i128, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<i128> for u64

source§

fn mod_power_of_2_shl(self, other: i128, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<i128> for u128

source§

fn mod_power_of_2_shl(self, other: i128, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<i128> for usize

source§

fn mod_power_of_2_shl(self, other: i128, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<isize> for u8

source§

fn mod_power_of_2_shl(self, other: isize, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<isize> for u16

source§

fn mod_power_of_2_shl(self, other: isize, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<isize> for u32

source§

fn mod_power_of_2_shl(self, other: isize, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<isize> for u64

source§

fn mod_power_of_2_shl(self, other: isize, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<isize> for u128

source§

fn mod_power_of_2_shl(self, other: isize, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<isize> for usize

source§

fn mod_power_of_2_shl(self, other: isize, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $\lfloor 2^nx \rfloor \equiv y \mod 2^k$.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<u8> for u8

source§

fn mod_power_of_2_shl(self, other: u8, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<u8> for u16

source§

fn mod_power_of_2_shl(self, other: u8, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<u8> for u32

source§

fn mod_power_of_2_shl(self, other: u8, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<u8> for u64

source§

fn mod_power_of_2_shl(self, other: u8, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<u8> for u128

source§

fn mod_power_of_2_shl(self, other: u8, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<u8> for usize

source§

fn mod_power_of_2_shl(self, other: u8, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<u16> for u8

source§

fn mod_power_of_2_shl(self, other: u16, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<u16> for u16

source§

fn mod_power_of_2_shl(self, other: u16, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<u16> for u32

source§

fn mod_power_of_2_shl(self, other: u16, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<u16> for u64

source§

fn mod_power_of_2_shl(self, other: u16, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<u16> for u128

source§

fn mod_power_of_2_shl(self, other: u16, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<u16> for usize

source§

fn mod_power_of_2_shl(self, other: u16, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<u32> for u8

source§

fn mod_power_of_2_shl(self, other: u32, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<u32> for u16

source§

fn mod_power_of_2_shl(self, other: u32, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<u32> for u32

source§

fn mod_power_of_2_shl(self, other: u32, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<u32> for u64

source§

fn mod_power_of_2_shl(self, other: u32, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<u32> for u128

source§

fn mod_power_of_2_shl(self, other: u32, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<u32> for usize

source§

fn mod_power_of_2_shl(self, other: u32, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<u64> for u8

source§

fn mod_power_of_2_shl(self, other: u64, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<u64> for u16

source§

fn mod_power_of_2_shl(self, other: u64, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<u64> for u32

source§

fn mod_power_of_2_shl(self, other: u64, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<u64> for u64

source§

fn mod_power_of_2_shl(self, other: u64, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<u64> for u128

source§

fn mod_power_of_2_shl(self, other: u64, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<u64> for usize

source§

fn mod_power_of_2_shl(self, other: u64, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<u128> for u8

source§

fn mod_power_of_2_shl(self, other: u128, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<u128> for u16

source§

fn mod_power_of_2_shl(self, other: u128, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<u128> for u32

source§

fn mod_power_of_2_shl(self, other: u128, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<u128> for u64

source§

fn mod_power_of_2_shl(self, other: u128, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<u128> for u128

source§

fn mod_power_of_2_shl(self, other: u128, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<u128> for usize

source§

fn mod_power_of_2_shl(self, other: u128, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = usize

source§

impl ModPowerOf2Shl<usize> for u8

source§

fn mod_power_of_2_shl(self, other: usize, pow: u64) -> u8

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u8

source§

impl ModPowerOf2Shl<usize> for u16

source§

fn mod_power_of_2_shl(self, other: usize, pow: u64) -> u16

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u16

source§

impl ModPowerOf2Shl<usize> for u32

source§

fn mod_power_of_2_shl(self, other: usize, pow: u64) -> u32

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u32

source§

impl ModPowerOf2Shl<usize> for u64

source§

fn mod_power_of_2_shl(self, other: usize, pow: u64) -> u64

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u64

source§

impl ModPowerOf2Shl<usize> for u128

source§

fn mod_power_of_2_shl(self, other: usize, pow: u64) -> u128

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = u128

source§

impl ModPowerOf2Shl<usize> for usize

source§

fn mod_power_of_2_shl(self, other: usize, pow: u64) -> usize

Left-shifts a number (multiplies it by a power of 2) modulo $2^k$. The number must be already reduced modulo $2^k$.

$f(x, n, k) = y$, where $x, y < 2^k$ and $2^nx \equiv y \mod 2^k$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if pow is greater than Self::WIDTH or if self is greater than or equal to $2^k$.

§Examples

See here.

§

type Output = usize

Implementors§