_nmod_poly_gcd_hgcd, nmod_poly_gcd_hgcd
Synopsis
#include <flint/nmod_poly.h>slong _nmod_poly_gcd_hgcd(nn_ptr G, nn_srcptr A, slong lenA, nn_srcptr B, slong lenB, nmod_t mod)sourcevoid nmod_poly_gcd_hgcd(nmod_poly_t G, const nmod_poly_t A, const nmod_poly_t B)sourceThe GCD by the half-GCD algorithm, with the conventions of _nmod_poly_gcd and nmod_poly_gcd. Its complexity is O(M(n) \log n), where M(n) is the cost of a multiplication of length n.
The outer loop calls _nmod_poly_hgcd to reduce the operands to about half their length, and finishes with the Euclidean algorithm once they are shorter than nmod_poly_hgcd_outer_cutoff(mod).
Cite this page
The FLINT team, “_nmod_poly_gcd_hgcd, nmod_poly_gcd_hgcd (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_gcd_hgcd.html (generated 2026-10-20).
@misc{flint-doc-nmod-poly-nmod-poly-gcd-hgcd,
author = {{The FLINT team}},
title = {{\_nmod\_poly\_gcd\_hgcd, nmod\_poly\_gcd\_hgcd (nmod\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_poly/_nmod_poly_gcd_hgcd.html},
note = {Generated 2026-10-20}
}