'Returns GCD of polynomial\'s coefficients.'

def content(f):

    domain = f.ring.domain
    cont = domain.zero
    gcd = domain.gcd
    for coeff in f.itercoeffs():
        cont = gcd(cont, coeff)
    return cont
