FLINT3.7.0-dev

_gr_poly_mulmod, gr_poly_mulmod, _gr_poly_mulmod_preinv, gr_poly_mulmod_preinv

Synopsis#include <flint/gr_poly.h>
int _gr_poly_mulmod(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_srcptr f, slong lenf, gr_ctx_t ctx)source
int gr_poly_mulmod(gr_poly_t res, const gr_poly_t poly1, const gr_poly_t poly2, const gr_poly_t f, gr_ctx_t ctx)source
int _gr_poly_mulmod_preinv(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_srcptr f, slong lenf, gr_srcptr finv, slong lenfinv, gr_ctx_t ctx)source
int gr_poly_mulmod_preinv(gr_poly_t res, const gr_poly_t poly1, const gr_poly_t poly2, const gr_poly_t f, const gr_poly_t finv, gr_ctx_t ctx)source

Set res to the remainder of the product of poly1 and poly2 by f.

_gr_poly_mulmod requires \mathit{len1} + \mathit{len2} - \mathit{lenf} > 0, that is a product that actually needs reduction, writes \mathit{lenf} - 1 coefficients, and does not allow res to be aliased with f. _gr_poly_mulmod_preinv does not require reduced inputs, but the quotient length \mathit{len1} + \mathit{len2} - \mathit{lenf} must not exceed \mathit{lenf} (GR_UNABLE otherwise), and res must not be aliased with any input.

Cite this page

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