_flint_mpn_gcdext_inplace
Synopsis
#include <flint/mpn_extras.h>mp_size_t _flint_mpn_gcdext_inplace(mp_ptr gp, mp_ptr sp, mp_size_t * sn, mp_ptr up, mp_size_t un, mp_ptr vp, mp_size_t vn)sourceThe extended GCD with the interface of GMP's mpn_gcdext: sets to , returning , and with the sign of to the cofactor of as for flint_mpn_gcdext. It is required that and that the top limb of is nonzero; the top limb of may be zero, so that can be padded to the length of to obtain its cofactor directly (as for a modular inverse). Both inputs are destroyed, and both input arrays must have room for one more limb. gp needs room for limbs and sp for limbs; they must not overlap each other or the inputs.
Cite this page
The FLINT team, “_flint_mpn_gcdext_inplace (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_inplace.html (generated 2026-11-02).
@misc{flint-doc-mpn-extras-flint-mpn-gcdext-inplace,
author = {{The FLINT team}},
title = {{\_flint\_mpn\_gcdext\_inplace (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_inplace.html},
note = {Generated 2026-11-02}
}