FLINT3.7.0-dev

_fmpq_poly_xgcd

Synopsis#include <flint/fmpq_poly.h>
void _fmpq_poly_xgcd(fmpz * G, fmpz_t denG, fmpz * S, fmpz_t denS, fmpz * T, fmpz_t denT, const fmpz * A, const fmpz_t denA, slong lenA, const fmpz * B, const fmpz_t denB, slong lenB)source

Computes polynomials GG, SS, and TT such that G=gcd⁡(A,B)=SA+TBG = \gcd(A, B) = S A + T B, where GG is the monic greatest common divisor of AA and BB.

Assumes that GG, SS, and TT have space for len⁡(B)\operatorname{len}(B), len⁡(B)\operatorname{len}(B), and len⁡(A)\operatorname{len}(A) coefficients, respectively, where it is also assumed that len⁡(A)≥len⁡(B)>0\operatorname{len}(A) \geq \operatorname{len}(B) > 0.

Does not support zero padding of the input arguments.

Cite this page

The FLINT team, “_fmpq_poly_xgcd (fmpq_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_poly/_fmpq_poly_xgcd.html (generated 2026-11-02).