pub trait ModSubAssign<RHS = Self, M = Self> {
    fn mod_sub_assign(&mut self, other: RHS, m: M);
}
Expand description

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

Required Methods

Implementations on Foreign Types

Subtracts two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.

$x \gets z$, where $x, y, z < m$ and $x - y \equiv z \mod m$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_sub from nmod_vec.h, FLINT 2.7.1, where the result is assigned to a.

Subtracts two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.

$x \gets z$, where $x, y, z < m$ and $x - y \equiv z \mod m$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_sub from nmod_vec.h, FLINT 2.7.1, where the result is assigned to a.

Subtracts two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.

$x \gets z$, where $x, y, z < m$ and $x - y \equiv z \mod m$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_sub from nmod_vec.h, FLINT 2.7.1, where the result is assigned to a.

Subtracts two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.

$x \gets z$, where $x, y, z < m$ and $x - y \equiv z \mod m$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_sub from nmod_vec.h, FLINT 2.7.1, where the result is assigned to a.

Subtracts two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.

$x \gets z$, where $x, y, z < m$ and $x - y \equiv z \mod m$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_sub from nmod_vec.h, FLINT 2.7.1, where the result is assigned to a.

Subtracts two numbers modulo a third number $m$, in place. Assumes the inputs are already reduced modulo $m$.

$x \gets z$, where $x, y, z < m$ and $x - y \equiv z \mod m$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_sub from nmod_vec.h, FLINT 2.7.1, where the result is assigned to a.

Implementors