FLINT3.7.0-dev

_gr_poly_add, gr_poly_add, _gr_poly_sub, gr_poly_sub

Synopsis#include <flint/gr_poly.h>
int _gr_poly_add(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_add(gr_poly_t res, const gr_poly_t poly1, const gr_poly_t poly2, gr_ctx_t ctx)source
int _gr_poly_sub(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_sub(gr_poly_t res, const gr_poly_t poly1, const gr_poly_t poly2, gr_ctx_t ctx)source

Set res to the sum or difference. The underscore versions write \max(\mathit{len1}, \mathit{len2}) coefficients and allow res to be either input.

Guides#

Cite this page

The FLINT team, “_gr_poly_add, gr_poly_add, _gr_poly_sub, gr_poly_sub (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_add.html (generated 2026-10-20).