pub trait ModPowerOf2AddAssign<RHS = Self> {
    fn mod_power_of_2_add_assign(&mut self, other: RHS, pow: u64);
}
Expand description

Adds two numbers modulo $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

Required Methods

Implementations on Foreign Types

Adds two numbers modulo a third number $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

$x \gets z$, where $x, y, z < 2^k$ and $x + y \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.

Adds two numbers modulo a third number $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

$x \gets z$, where $x, y, z < 2^k$ and $x + y \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.

Adds two numbers modulo a third number $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

$x \gets z$, where $x, y, z < 2^k$ and $x + y \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.

Adds two numbers modulo a third number $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

$x \gets z$, where $x, y, z < 2^k$ and $x + y \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.

Adds two numbers modulo a third number $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

$x \gets z$, where $x, y, z < 2^k$ and $x + y \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.

Adds two numbers modulo a third number $2^k$, in place. Assumes the inputs are already reduced modulo $2^k$.

$x \gets z$, where $x, y, z < 2^k$ and $x + y \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