pub trait ModPowerOf2Mul<RHS = Self> {
    type Output;

    fn mod_power_of_2_mul(self, other: RHS, pow: u64) -> Self::Output;
}
Expand description

Multiplies two numbers modulo $2^k$. Assumes the inputs are already reduced modulo $2^k$.

Required Associated Types

Required Methods

Implementations on Foreign Types

Multiplies two numbers modulo a third number $2^k$. Assumes the inputs are already reduced modulo $2^k$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if pow is greater than Self::WIDTH.

Examples

See here.

Multiplies two numbers modulo a third number $2^k$. Assumes the inputs are already reduced modulo $2^k$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if pow is greater than Self::WIDTH.

Examples

See here.

Multiplies two numbers modulo a third number $2^k$. Assumes the inputs are already reduced modulo $2^k$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if pow is greater than Self::WIDTH.

Examples

See here.

Multiplies two numbers modulo a third number $2^k$. Assumes the inputs are already reduced modulo $2^k$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if pow is greater than Self::WIDTH.

Examples

See here.

Multiplies two numbers modulo a third number $2^k$. Assumes the inputs are already reduced modulo $2^k$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if pow is greater than Self::WIDTH.

Examples

See here.

Multiplies two numbers modulo a third number $2^k$. Assumes the inputs are already reduced modulo $2^k$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if pow is greater than Self::WIDTH.

Examples

See here.

Implementors