pub trait ModNeg<M = Self> {
    type Output;

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

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

Required Associated Types

Required Methods

Implementations on Foreign Types

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

$f(x, m) = 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.

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

$f(x, m) = 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.

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

$f(x, m) = 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.

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

$f(x, m) = 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.

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

$f(x, m) = 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.

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

$f(x, m) = 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.

Implementors