def _dmp_simplify_gcd(f, g, u, K):
    df = dmp_degree(f, u)
    dg = dmp_degree(g, u)

    if df > 0 and dg > 0:
        return None

    if not (df or dg):
        F = dmp_LC(f, K)
        G = dmp_LC(g, K)
    else:
        if not df:
            F = dmp_LC(f, K)
            G = dmp_content(g, u, K)
        else:
            F = dmp_content(f, u, K)
            G = dmp_LC(g, K)

    v = u - 1
    h = dmp_gcd(F, G, v, K)

    cff = [ dmp_quo(cf, h, v, K) for cf in f ]
    cfg = [ dmp_quo(cg, h, v, K) for cg in g ]

    return [h], cff, cfg
Returns the date from an index beyond the end of a date series.
dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py/_dmp_simplify_gcd--crossover with--dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/base/datetools.py/_date_from_idx