FLINT3.7.0-dev

_gr_poly_resultant, gr_poly_resultant, _gr_poly_resultant_generic, _gr_poly_resultant_euclidean, gr_poly_resultant_euclidean, _gr_poly_resultant_hgcd, gr_poly_resultant_hgcd, _gr_poly_resultant_subresultant, gr_poly_resultant_subresultant, _gr_poly_resultant_sylvester, gr_poly_resultant_sylvester, _gr_poly_resultant_small, gr_poly_resultant_small

Synopsis#include <flint/gr_poly.h>
int _gr_poly_resultant(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_resultant(gr_ptr res, const gr_poly_t f, const gr_poly_t g, gr_ctx_t ctx)source
int _gr_poly_resultant_generic(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int _gr_poly_resultant_euclidean(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_resultant_euclidean(gr_ptr res, const gr_poly_t f, const gr_poly_t g, gr_ctx_t ctx)source
int _gr_poly_resultant_hgcd(gr_ptr res, gr_srcptr A, slong lenA, gr_srcptr B, slong lenB, slong inner_cutoff, slong cutoff, gr_ctx_t ctx)source
int gr_poly_resultant_hgcd(gr_ptr res, const gr_poly_t f, const gr_poly_t g, slong inner_cutoff, slong cutoff, gr_ctx_t ctx)source
int _gr_poly_resultant_subresultant(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_resultant_subresultant(gr_ptr res, const gr_poly_t f, const gr_poly_t g, gr_ctx_t ctx)source
int _gr_poly_resultant_sylvester(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_resultant_sylvester(gr_ptr res, const gr_poly_t f, const gr_poly_t g, gr_ctx_t ctx)source
int _gr_poly_resultant_small(gr_ptr res, gr_srcptr poly1, slong len1, gr_srcptr poly2, slong len2, gr_ctx_t ctx)source
int gr_poly_resultant_small(gr_ptr res, const gr_poly_t f, const gr_poly_t g, gr_ctx_t ctx)source

Set res to the resultant of f and g. The non-underscore functions return GR_UNABLE if a leading coefficient is not provably nonzero. The underscore functions require \mathit{len1} \ge \mathit{len2} \ge 1 and nonzero leading coefficients.

  • The euclidean version follows the Euclidean remainder sequence and accumulates the leading coefficients; the hgcd version does the same with the half-gcd algorithm, with the tuning parameters inner_cutoff (passed to _gr_poly_hgcd) and cutoff. Both need inverses of leading coefficients and return GR_DOMAIN when one does not exist, so they are meant for fields.
  • The subresultant version uses the subresultant pseudo-remainder sequence [Col1967; BT1971], with exact divisions only; it is valid over any GCD domain (in fact any integral domain with exact division).
  • The sylvester version computes the determinant of the Sylvester matrix with gr_mat_det, which is division-free by default and so works over any commutative ring, and is also the most robust choice over inexact rings.
  • The small version uses division-free straight-line formulas for \mathit{len2} \le 3 or \mathit{len1} \le 2 and returns GR_UNABLE for larger inputs.

gr_poly_resultant calls the ring method GR_METHOD_POLY_RESULTANT. The default _gr_poly_resultant_generic tries the small formulas; over finite rings and fields it then uses the half-gcd algorithm when both lengths are at least 200 (inner cutoff 100) and the Euclidean algorithm otherwise; if that fails or the ring is not a field, it uses the subresultant algorithm over unique factorisation domains, and finally the Sylvester determinant. The contexts of polynomial rings override the method with the bivariate algorithms below.

References#

Cite this page

The FLINT team, “_gr_poly_resultant, gr_poly_resultant, _gr_poly_resultant_generic, _gr_poly_resultant_euclidean, gr_poly_resultant_euclidean, _gr_poly_resultant_hgcd, gr_poly_resultant_hgcd, _gr_poly_resultant_subresultant, gr_poly_resultant_subresultant, _gr_poly_resultant_sylvester, gr_poly_resultant_sylvester, _gr_poly_resultant_small, gr_poly_resultant_small (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_resultant.html (generated 2026-10-20).