pub trait ModPowerOf2ShrAssign<RHS> {
    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. Assumes the input is already reduced modulo $2^k$.

Required Methods

Implementations on Foreign Types

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Right-shifts a number (divides it by a power of 2) modulo $2^k$, in place. Assumes the input is 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.

Examples

See here.

Implementors