def dup_content(f, K):
 from sympy.polys.domains import QQ
 if (not f):
  return K.zero
 cont = K.zero
 if (K == QQ):
  for c in f:
   cont = K.gcd(cont, c)
 else:
  for c in f:
   cont = K.gcd(cont, c)
   if K.is_one(cont):
    break
 return cont

def dup_content ( f , K ) : from sympy . polys . domains import QQ if ( not f ) : return K . zero cont = K . zero if ( K == QQ ) : for c in f : cont = K . gcd ( cont , c ) else : for c in f : cont = K . gcd ( cont , c ) if K . is_one ( cont ) : break return cont
compute the gcd of coefficients of f in k[x] .