FLINT3.7.0-dev

n_bpoly_mod_resultant, _n_bpoly_mod_resultant, _n_bpoly_mod_resultant_len, _n_bpoly_mod_resultant_multipoint, n_bpoly_mod_resultant_cutoff

Synopsis#include <flint/nmod_mpoly.h>
int n_bpoly_mod_resultant(n_poly_t res, const n_bpoly_t A, const n_bpoly_t B, nmod_t mod)source
int _n_bpoly_mod_resultant(n_poly_t res, const n_poly_struct * A, slong lenA, const n_poly_struct * B, slong lenB, nmod_t mod)source
int _n_bpoly_mod_resultant_len(n_poly_t res, const n_poly_struct * A, slong lenA, const n_poly_struct * B, slong lenB, slong rlen, nmod_t mod)source
int _n_bpoly_mod_resultant_multipoint(n_poly_t res, const n_poly_struct * A, slong lenA, const n_poly_struct * B, slong lenB, slong rlen, nmod_t mod)source
int n_bpoly_mod_resultant_cutoff(slong lenA, slong lenB, slong npoints)source

n_bpoly_mod_resultant sets res to the resultant with respect to the main variable yy of the bivariate polynomials A and B over Fp\mathbb{F}_p (stored as polynomials in yy whose coefficients are polynomials in xx). It returns 0, leaving res unchanged, when no algorithm applies, which happens when Fp\mathbb{F}_p does not contain enough suitable points. _n_bpoly_mod_resultant is the same for coefficient arrays with lenA≥lenB≥2\mathit{lenA} \ge \mathit{lenB} \ge 2 and nonzero leading coefficients, and _n_bpoly_mod_resultant_len is the same again given that the resultant has length at most rlen in xx (or WORD_MAX), which saves work when that is less than the bound read off the degrees.

These choose the algorithm, by the sizes, and every dense bivariate resultant over Fp\mathbb{F}_p in FLINT goes through them: those of nmod_mpoly_resultant after Kronecker substitution, the images modulo primes of fmpz_bpoly_resultant (and so of fmpz_mpoly_resultant and fmpq_mpoly_resultant), and the resultants of gr_poly over polynomial rings over nmod. An algorithm added to _n_bpoly_mod_resultant_len is therefore used by all of these in its range. For now the only one is _n_bpoly_mod_resultant_multipoint, evaluation at many values of xx and interpolation (see Bivariate resultants by evaluation and interpolation), which returns 0 when Fp\mathbb{F}_p does not contain enough suitable points. The algorithms are threaded. n_bpoly_mod_resultant_cutoff returns whether the best of them is expected to beat the subresultant algorithm for the given lengths in yy and number of points.

Cite this page

The FLINT team, “n_bpoly_mod_resultant, _n_bpoly_mod_resultant, _n_bpoly_mod_resultant_len, _n_bpoly_mod_resultant_multipoint, n_bpoly_mod_resultant_cutoff (nmod_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_mpoly/n_bpoly_mod_resultant.html (generated 2026-11-20).