FLINT3.7.0-dev

fmpz_xgcd_partial

Synopsis#include <flint/fmpz.h>
void fmpz_xgcd_partial(fmpz_t co2, fmpz_t co1, fmpz_t r2, fmpz_t r1, const fmpz_t L)source

Runs the extended Euclidean algorithm on r_2 > r_1 > 0 until the remainder drops to at most L, with Lehmer's acceleration. On return r_2 and r_1 are the last two remainders and co2, co1 the corresponding cofactors, with co2\cdot r_1 - co1\cdot r_2 = \pm r_{2,\mathrm{orig}}. No aliasing is allowed.

Cite this page

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