pub trait ModAdd<RHS = Self, M = Self> {
type Output;

fn mod_add(self, other: RHS, m: M) -> Self::Output;
}
Expand description

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

## Implementations on Foreign Types

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

$f(x, y, m) = z$, where $x, y, z < m$ and $x + y \equiv z \mod m$.

##### Examples

See here.

This is equivalent to nmod_add from nmod_vec.h, FLINT 2.7.1.

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

$f(x, y, m) = z$, where $x, y, z < m$ and $x + y \equiv z \mod m$.

##### Examples

See here.

This is equivalent to nmod_add from nmod_vec.h, FLINT 2.7.1.

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

$f(x, y, m) = z$, where $x, y, z < m$ and $x + y \equiv z \mod m$.

##### Examples

See here.

This is equivalent to nmod_add from nmod_vec.h, FLINT 2.7.1.

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

$f(x, y, m) = z$, where $x, y, z < m$ and $x + y \equiv z \mod m$.

##### Examples

See here.

This is equivalent to nmod_add from nmod_vec.h, FLINT 2.7.1.

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

$f(x, y, m) = z$, where $x, y, z < m$ and $x + y \equiv z \mod m$.

##### Examples

See here.

This is equivalent to nmod_add from nmod_vec.h, FLINT 2.7.1.

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

$f(x, y, m) = z$, where $x, y, z < m$ and $x + y \equiv z \mod m$.

##### Worst-case complexity

This is equivalent to nmod_add from nmod_vec.h, FLINT 2.7.1.