pub trait ModMulPrecomputedAssign<RHS = Self, M = Self>: ModMulPrecomputed<RHS, M> {
    fn mod_mul_precomputed_assign(
        &mut self,
        other: RHS,
        m: M,
        data: &Self::Data
    ); }
Expand description

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

If multiple modular multiplications with the same modulus are necessary, it can be quicker to precompute some piece of data and reuse it in the multiplication calls. This trait provides a function for using precomputed data during multiplication. For precomputing the data, use the precompute_mod_mul_data function in ModMulPrecomputed.

Required Methods

Implementations on Foreign Types

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

Some precomputed data is provided; this speeds up computations involving several modular multiplications with the same modulus. The precomputed data should be obtained using precompute_mod_mul_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to n_mulmod2_preinv from ulong_extras.h, FLINT 2.7.1, where the return value is assigned to a.

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

Some precomputed data is provided; this speeds up computations involving several modular multiplications with the same modulus. The precomputed data should be obtained using precompute_mod_mul_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to n_mulmod2_preinv from ulong_extras.h, FLINT 2.7.1, where the return value is assigned to a.

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

Some precomputed data is provided; this speeds up computations involving several modular multiplications with the same modulus. The precomputed data should be obtained using precompute_mod_mul_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to n_mulmod2_preinv from ulong_extras.h, FLINT 2.7.1, where the return value is assigned to a.

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

Some precomputed data is provided; this speeds up computations involving several modular multiplications with the same modulus. The precomputed data should be obtained using precompute_mod_mul_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to n_mulmod2_preinv from ulong_extras.h, FLINT 2.7.1, where the return value is assigned to a.

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

Some precomputed data is provided; this speeds up computations involving several modular multiplications with the same modulus. The precomputed data should be obtained using precompute_mod_mul_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to n_mulmod2_preinv from ulong_extras.h, FLINT 2.7.1, where the return value is assigned to a.

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

Some precomputed data is provided; this speeds up computations involving several modular multiplications with the same modulus. The precomputed data should be obtained using precompute_mod_mul_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

This is equivalent to n_mulmod2_preinv from ulong_extras.h, FLINT 2.7.1, where the return value is assigned to a.

Implementors