

def _rewrite_saxena(fac, po, g1, g2, x, full_pb=False):
    '\n    Rewrite the integral fac*po*g1*g2 from 0 to oo in terms of G functions\n    with argument c*x.\n    Return C, f1, f2 such that integral C f1 f2 from 0 to infinity equals\n    integral fac po g1 g2 from 0 to infinity.\n\n    >>> from sympy.integrals.meijerint import _rewrite_saxena\n    >>> from sympy.abc import s, t, m\n    >>> from sympy import meijerg\n    >>> g1 = meijerg([], [], [0], [], s*t)\n    >>> g2 = meijerg([], [], [m/2], [-m/2], t**2/4)\n    >>> r = _rewrite_saxena(1, t**0, g1, g2, t)\n    >>> r[0]\n    s/(4*sqrt(pi))\n    >>> r[1]\n    meijerg(((), ()), ((-1/2, 0), ()), s**2*t/4)\n    >>> r[2]\n    meijerg(((), ()), ((m/2,), (-m/2,)), t/4)\n    '
    from sympy.core.numbers import ilcm

    def pb(g):
        (a, b) = _get_coeff_exp(g.argument, x)
        per = g.get_period()
        return meijerg(g.an, g.aother, g.bm, g.bother, (_my_principal_branch(a, per, full_pb) * (x ** b)))
    (_, s) = _get_coeff_exp(po, x)
    (_, b1) = _get_coeff_exp(g1.argument, x)
    (_, b2) = _get_coeff_exp(g2.argument, x)
    if ((b1 < 0) == True):
        b1 = (- b1)
        g1 = _flip_g(g1)
    if ((b2 < 0) == True):
        b2 = (- b2)
        g2 = _flip_g(g2)
    if ((not b1.is_Rational) or (not b2.is_Rational)):
        return
    (m1, n1) = (b1.p, b1.q)
    (m2, n2) = (b2.p, b2.q)
    tau = ilcm((m1 * n2), (m2 * n1))
    r1 = (tau // (m1 * n2))
    r2 = (tau // (m2 * n1))
    (C1, g1) = _inflate_g(g1, r1)
    (C2, g2) = _inflate_g(g2, r2)
    g1 = pb(g1)
    g2 = pb(g2)
    fac *= (C1 * C2)
    (a1, b) = _get_coeff_exp(g1.argument, x)
    (a2, _) = _get_coeff_exp(g2.argument, x)
    exp = (((b + 1) / b) - 1)
    fac = (fac / (abs(b) * (a1 ** exp)))

    def tr(l):
        return [(a + exp) for a in l]
    g1 = meijerg(tr(g1.an), tr(g1.aother), tr(g1.bm), tr(g1.bother), (a1 * x))
    g2 = meijerg(g2.an, g2.aother, g2.bm, g2.bother, (a2 * x))
    return (powdenest(fac, polar=True), g1, g2)

dataset/ETHPy150Open sympy/sympy/sympy/integrals/meijerint.py _rewrite_saxena/VarMisuse@380/803 `s`->`b`