FLINT3.7.0-dev

_nmod_poly_add, _nmod_poly_sub

Synopsis#include <flint/nmod_poly.h>
void _nmod_poly_add(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, nmod_t mod)source
void _nmod_poly_sub(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, nmod_t mod)source

Set res to the sum and the difference of (poly1, len1) and (poly2, len2), writing \max(\mathit{len1}, \mathit{len2}) coefficients, which may include leading zeros. Any lengths, including 0, are allowed, and res may be poly1 or poly2.

Cite this page

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