In Sage 9.4, in the following code:
P.<x> = QQ[]
pol = 2*x^2 + 4*x + 6
print( gcd(pol) )
print( gcd(pol.change_ring(ZZ)) )
The first gcd
works fine, while the second gcd
results in
TypeError: object of type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint' has no len()
There is a workaround by using gcd(pol.coefficients())
, but I wonder if above error is a bug.