gr_poly_gcd_wrapper, gr_poly_xgcd_wrapper
#include <flint/gr_poly.h>int gr_poly_gcd_wrapper(gr_method_poly_gcd_op gcd_impl, int canonicalise_unit, gr_poly_t G, const gr_poly_t A, const gr_poly_t B, gr_ctx_t ctx)sourceint gr_poly_xgcd_wrapper(gr_method_poly_xgcd_op _xgcd_op, gr_poly_t G, gr_poly_t S, gr_poly_t T, const gr_poly_t A, const gr_poly_t B, gr_ctx_t ctx)sourceImplement gr_poly_gcd and gr_poly_xgcd around a given underscore implementation (with the signatures of _gr_poly_gcd and _gr_poly_xgcd): handle zero and constant inputs, order the inputs by length, check the leading coefficients, manage memory and aliasing, and canonicalise the result (for the GCD only if canonicalise_unit is nonzero; the cofactors of the extended GCD are scaled by the same unit). The non-underscore algorithm-specific functions are built this way, and rings can use them to wrap their own GCD methods.
The FLINT team, “gr_poly_gcd_wrapper, gr_poly_xgcd_wrapper (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/gr_poly_gcd_wrapper.html (generated 2026-10-20).
@misc{flint-doc-gr-poly-gr-poly-gcd-wrapper,
author = {{The FLINT team}},
title = {{gr\_poly\_gcd\_wrapper, gr\_poly\_xgcd\_wrapper (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/gr_poly_gcd_wrapper.html},
note = {Generated 2026-10-20}
}