Open
Description
When using fmpz_mpoly
, the gcd contains the content of the polynomials:
>>> import flint
>>> ctx = flint.fmpq_mpoly_ctx.get('n')
>>> flint.fmpz_mpoly(4, ctx).gcd(flint.fmpz_mpoly(6, ctx))
2
However, when using fmpq_mpoly
, gcd does not contain the content of the polynomials:
>>> import flint
>>> ctx = flint.fmpq_mpoly_ctx.get('n')
>>> flint.fmpq_mpoly(4, ctx).gcd(flint.fmpq_mpoly(6, ctx))
1
Digging further, I've noticed that fmpq
does not have a gcd method, which could explain this root cause.
The GCD of two rationals a/b
, c/d
is simply extended as gcd(a*d, b*c) / (b*d)
.
I'm not sure if this falls under the category of a bugfix or a feature request, but is it possible to achieve this behavior?
Metadata
Metadata
Assignees
Labels
No labels