pub trait ModNegAssign<M = Self> {
    fn mod_neg_assign(&mut self, m: M);
}
Expand description

Negates a number modulo another number $m$, in place. Assumes the input is already reduced modulo $m$.

Required Methods

Implementations on Foreign Types

Negates a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

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

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_neg from nmod_vec.h, FLINT 2.7.1, where the output is assigned to a.

Negates a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

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

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_neg from nmod_vec.h, FLINT 2.7.1, where the output is assigned to a.

Negates a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

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

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_neg from nmod_vec.h, FLINT 2.7.1, where the output is assigned to a.

Negates a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

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

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_neg from nmod_vec.h, FLINT 2.7.1, where the output is assigned to a.

Negates a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

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

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_neg from nmod_vec.h, FLINT 2.7.1, where the output is assigned to a.

Negates a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

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

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to nmod_neg from nmod_vec.h, FLINT 2.7.1, where the output is assigned to a.

Implementors