FLINT3.7.0-dev

n_poly_mod_gcd, n_poly_mod_xgcd

Synopsis#include <flint/n_poly.h>
void n_poly_mod_gcd(n_poly_t G, const n_poly_t A, const n_poly_t B, nmod_t mod)source
void n_poly_mod_xgcd(n_poly_t G, n_poly_t S, n_poly_t T, const n_poly_t A, const n_poly_t B, nmod_t mod)source

Set G to the monic greatest common divisor of A and B, and for n_poly_mod_xgcd the cofactors with SA + TB = G (see nmod_poly_xgcd). The modulus must be prime.

Cite this page

The FLINT team, “n_poly_mod_gcd, n_poly_mod_xgcd (n_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/n_poly/n_poly_mod_gcd.html (generated 2026-10-20).