Skip to content

FLINT`PolynomialGCD

Status: Stable

documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

Description

FLINT`PolynomialGCD[a, b] gives the monic greatest common divisor of the polynomials a and b over the rationals, computed directly via FLINT (fmpq_mpoly_gcd). Multivariate. Returns unevaluated if an argument is not a polynomial over Q.

Examples

All examples below are verified against the current Mathilda build.

In[1]:= FLINT`PolynomialGCD[x^2 - 1, x^2 - x]
Out[1]= -1 + x

In[2]:= FLINT`PolynomialGCD[x^2 - y^2, x^2 + 2 x y + y^2]
Out[2]= x + y

Implementation notes

Attributes: Protected.

Implementation status

Stable — documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

References