You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this ticket is to implement a Cython method
`Field._gcd_univariate_polynomial()` using the standard Euclidean
algorithm. This is much faster than
`Fields.ParentMethods._gcd_univariate_polynomial()`, which calls
`EuclideanDomains.ElementMethods.gcd()`, since both are Python methods.
(The `_gcd_univariate_polynomial` mechanism was introduced in #13442.)
The following bug can then be fixed by just removing
`PolynomialRealDense.gcd()`, which does not take into account the case
where one of the arguments of `gcd` is zero:
{{{
sage: R.<x> = RR[]
sage: x.gcd(R.zero())
Traceback (most recent call last):
...
TypeError: 'MinusInfinity' object cannot be interpreted as an index
}}}
Removing this method ''without'' implementing
`Field._gcd_univariate_polynomial()` (falling back on Python code) is
about twice as slow; with this ticket there is no slowdown.
Similarly, to make `CC` and `QQbar` use the new method instead of Python
code, we also remove the now obsolete `Polynomial_generic_field.gcd()`.
URL: http://trac.sagemath.org/18461
Reported by: pbruin
Ticket author(s): Peter Bruin
Reviewer(s): Bruno Grenet
0 commit comments