

def dup_gcdex(f, g, K):
    '\n    Extended Euclidean algorithm in `F[x]`.\n\n    Returns ``(s, t, h)`` such that ``h = gcd(f, g)`` and ``s*f + t*g = h``.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, QQ\n    >>> R, x = ring("x", QQ)\n\n    >>> f = x**4 - 2*x**3 - 6*x**2 + 12*x + 15\n    >>> g = x**3 + x**2 - 4*x - 4\n\n    >>> R.dup_gcdex(f, g)\n    (-1/5*x + 3/5, 1/5*x**2 - 6/5*x + 2, x + 1)\n\n    '
    (s, h) = dup_half_gcdex(f, g, K)
    F = dup_sub_mul(h, s, s, K)
    t = dup_quo(F, g, K)
    return (s, t, h)

dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py dup_gcdex/VarMisuse@39/302 `f`->`s`