def dup_ff_prs_gcd(f, g, K):
 result = _dup_ff_trivial_gcd(f, g, K)
 if (result is not None):
  return result
 h = dup_subresultants(f, g, K)[(-1)]
 h = dup_monic(h, K)
 cff = dup_quo(f, h, K)
 cfg = dup_quo(g, h, K)
 return (h, cff, cfg)

def dup_ff_prs_gcd ( f , g , K ) : result = _dup_ff_trivial_gcd ( f , g , K ) if ( result is not None ) : return result h = dup_subresultants ( f , g , K ) [ ( - 1 ) ] h = dup_monic ( h , K ) cff = dup_quo ( f , h , K ) cfg = dup_quo ( g , h , K ) return ( h , cff , cfg )
computes polynomial gcd using subresultants over a field .