pub trait ModPowerOf2ShrAssign<RHS> {
    // Required method
    fn mod_power_of_2_shr_assign(&mut self, other: RHS, pow: u64);
}
Expand description

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

Required Methods§

source

fn mod_power_of_2_shr_assign(&mut self, other: RHS, pow: u64)

Implementations on Foreign Types§

source§

impl ModPowerOf2ShrAssign<i8> for u8

source§

fn mod_power_of_2_shr_assign(&mut self, other: i8, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i8> for u16

source§

fn mod_power_of_2_shr_assign(&mut self, other: i8, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i8> for u32

source§

fn mod_power_of_2_shr_assign(&mut self, other: i8, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i8> for u64

source§

fn mod_power_of_2_shr_assign(&mut self, other: i8, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i8> for u128

source§

fn mod_power_of_2_shr_assign(&mut self, other: i8, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i8> for usize

source§

fn mod_power_of_2_shr_assign(&mut self, other: i8, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i16> for u8

source§

fn mod_power_of_2_shr_assign(&mut self, other: i16, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i16> for u16

source§

fn mod_power_of_2_shr_assign(&mut self, other: i16, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i16> for u32

source§

fn mod_power_of_2_shr_assign(&mut self, other: i16, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i16> for u64

source§

fn mod_power_of_2_shr_assign(&mut self, other: i16, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i16> for u128

source§

fn mod_power_of_2_shr_assign(&mut self, other: i16, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i16> for usize

source§

fn mod_power_of_2_shr_assign(&mut self, other: i16, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i32> for u8

source§

fn mod_power_of_2_shr_assign(&mut self, other: i32, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i32> for u16

source§

fn mod_power_of_2_shr_assign(&mut self, other: i32, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i32> for u32

source§

fn mod_power_of_2_shr_assign(&mut self, other: i32, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i32> for u64

source§

fn mod_power_of_2_shr_assign(&mut self, other: i32, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i32> for u128

source§

fn mod_power_of_2_shr_assign(&mut self, other: i32, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i32> for usize

source§

fn mod_power_of_2_shr_assign(&mut self, other: i32, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i64> for u8

source§

fn mod_power_of_2_shr_assign(&mut self, other: i64, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i64> for u16

source§

fn mod_power_of_2_shr_assign(&mut self, other: i64, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i64> for u32

source§

fn mod_power_of_2_shr_assign(&mut self, other: i64, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i64> for u64

source§

fn mod_power_of_2_shr_assign(&mut self, other: i64, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i64> for u128

source§

fn mod_power_of_2_shr_assign(&mut self, other: i64, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i64> for usize

source§

fn mod_power_of_2_shr_assign(&mut self, other: i64, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i128> for u8

source§

fn mod_power_of_2_shr_assign(&mut self, other: i128, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i128> for u16

source§

fn mod_power_of_2_shr_assign(&mut self, other: i128, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i128> for u32

source§

fn mod_power_of_2_shr_assign(&mut self, other: i128, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i128> for u64

source§

fn mod_power_of_2_shr_assign(&mut self, other: i128, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i128> for u128

source§

fn mod_power_of_2_shr_assign(&mut self, other: i128, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<i128> for usize

source§

fn mod_power_of_2_shr_assign(&mut self, other: i128, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<isize> for u8

source§

fn mod_power_of_2_shr_assign(&mut self, other: isize, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<isize> for u16

source§

fn mod_power_of_2_shr_assign(&mut self, other: isize, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<isize> for u32

source§

fn mod_power_of_2_shr_assign(&mut self, other: isize, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<isize> for u64

source§

fn mod_power_of_2_shr_assign(&mut self, other: isize, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<isize> for u128

source§

fn mod_power_of_2_shr_assign(&mut self, other: isize, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

source§

impl ModPowerOf2ShrAssign<isize> for usize

source§

fn mod_power_of_2_shr_assign(&mut self, other: isize, pow: u64)

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. The number must be already reduced modulo $2^k$.

$x \gets y$, where $x, y < 2^k$ and $\lfloor 2^{-n}x \rfloor \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.

Implementors§