flint_mpn_gcdext
Synopsis
#include <flint/mpn_extras.h>mp_size_t flint_mpn_gcdext(mp_ptr gp, mp_ptr sp, mp_size_t * sn, mp_srcptr ap, mp_size_t an, mp_srcptr bp, mp_size_t bn)sourceSets to , returning , and with the sign of to the cofactor of in that mpz_gcdext gives: normally , and the conventions for the exceptional cases determine uniquely. The other cofactor is . The operands must be nonzero with nonzero top limbs; they are not modified. gp needs room for limbs and sp for limbs. The outputs must not overlap each other; each may be equal to ap or bp (if that has the room) but must not otherwise overlap them. When , is obtained from the cofactor of by a multiplication and an exact division.
Cite this page
The FLINT team, “flint_mpn_gcdext (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_gcdext.html (generated 2026-11-02).
@misc{flint-doc-mpn-extras-flint-mpn-gcdext,
author = {{The FLINT team}},
title = {{flint\_mpn\_gcdext (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/flint_mpn_gcdext.html},
note = {Generated 2026-11-02}
}