FLINT3.7.0-dev

_mpn_mod_vec_neg, _mpn_mod_vec_add, _mpn_mod_vec_sub, _mpn_mod_vec_mul

Synopsis#include <flint/mpn_mod.h>
int _mpn_mod_vec_neg(nn_ptr res, nn_srcptr x, slong len, gr_ctx_t ctx)source
int _mpn_mod_vec_add(nn_ptr res, nn_srcptr x, nn_srcptr y, slong len, gr_ctx_t ctx)source
int _mpn_mod_vec_sub(nn_ptr res, nn_srcptr x, nn_srcptr y, slong len, gr_ctx_t ctx)source
int _mpn_mod_vec_mul(nn_ptr res, nn_srcptr x, nn_srcptr y, slong len, gr_ctx_t ctx)source

Elementwise negation, addition, subtraction and multiplication. Two-limb moduli use inlined fixed-size code with the modulus kept in registers.

Cite this page

The FLINT team, “_mpn_mod_vec_neg, _mpn_mod_vec_add, _mpn_mod_vec_sub, _mpn_mod_vec_mul (mpn_mod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_mod/_mpn_mod_vec_neg.html (generated 2026-10-20).