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.
dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py/dup_ff_prs_gcd