

def dup_euclidean_prs(f, g, K):
    '\n    Euclidean polynomial remainder sequence (PRS) in `K[x]`.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, QQ\n    >>> R, x = ring("x", QQ)\n\n    >>> f = x**8 + x**6 - 3*x**4 - 3*x**3 + 8*x**2 + 2*x - 5\n    >>> g = 3*x**6 + 5*x**4 - 4*x**2 - 9*x + 21\n\n    >>> prs = R.dup_euclidean_prs(f, g)\n\n    >>> prs[0]\n    x**8 + x**6 - 3*x**4 - 3*x**3 + 8*x**2 + 2*x - 5\n    >>> prs[1]\n    3*x**6 + 5*x**4 - 4*x**2 - 9*x + 21\n    >>> prs[2]\n    -5/9*x**4 + 1/9*x**2 - 1/3\n    >>> prs[3]\n    -117/25*x**2 - 9*x + 441/25\n    >>> prs[4]\n    233150/19773*x - 102500/6591\n    >>> prs[5]\n    -1288744821/543589225\n\n    '
    prs = [f, g]
    h = dup_rem(f, g, K)
    while h:
        prs.append(h)
        (f, g) = (g, h)
        h = dup_rem(f, g, K)
    return prs

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