

def dup_prs_resultant(f, g, K):
    '\n    Resultant algorithm in `K[x]` using subresultant PRS.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, ZZ\n    >>> R, x = ring("x", ZZ)\n\n    >>> R.dup_prs_resultant(x**2 + 1, x**2 - 1)\n    (4, [x**2 + 1, x**2 - 1, -2])\n\n    '
    if ((not f) or (not g)):
        return (K.zero, [])
    (R, S) = dup_inner_subresultants(f, g, K)
    if (dup_degree(R[(- 1)]) > 0):
        return (K.zero, R)
    return (S[(- 1)], R)

dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py dup_prs_resultant/original