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 G, S, and T such that G = \gcd(A, B) = S A + T B, where G is the monic greatest common divisor of A and B.

Assumes that G, S, and T have space for \operatorname{len}(B), \operatorname{len}(B), and \operatorname{len}(A) coefficients, respectively, where it is also assumed that \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-10-20).