FLINT3.7.0-dev

_nmod_mpoly_add, _nmod_mpoly_sub

Synopsis#include <flint/nmod_mpoly.h>
slong _nmod_mpoly_add(ulong * coeff1, ulong * exp1, const ulong * coeff2, const ulong * exp2, slong len2, const ulong * coeff3, const ulong * exp3, slong len3, slong N, const ulong * cmpmask, nmod_t fctx)source
slong _nmod_mpoly_sub(ulong * coeff1, ulong * exp1, const ulong * coeff2, const ulong * exp2, slong len2, const ulong * coeff3, const ulong * exp3, slong len3, slong N, const ulong * cmpmask, nmod_t fctx)source

Merge the sorted term arrays of lengths len2 and len3 (with N words per exponent and comparison mask cmpmask) into coeff1, exp1, adding or subtracting coefficients modulo fctx, and return the length of the result. The output must have room for len2 + len3 terms.

Cite this page

The FLINT team, “_nmod_mpoly_add, _nmod_mpoly_sub (nmod_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_mpoly/_nmod_mpoly_add.html (generated 2026-10-20).