(f, g)
return res
Computes quotient of fractions ``f`` and ``g``.
Computes quotient of fractions ``f`` and ``g``.
Computes quotient of fractions f and g .
def quo(f, g):
        """Computes quotient of fractions ``f`` and ``g``. """
        if isinstance(g, DMP):
            lev, dom, per, (F_num, F_den), G = f.poly_unify(g)
            num, den = F_num, dmp_mul(F_den, G, lev, dom)
        else:
            lev, dom, per, F, G = f.frac_unify(g)
            (F_num, F_den), (G_num, G_den) = F, G

            num = dmp_mul(F_num, G_den, lev, dom)
            den = dmp_mul(F_den, G_num, lev, dom)

        res = per(num, den)
        if f.ring is not None and res not in f.ring:
            from sympy.polys.polyerrors import ExactQuotientFailed
            raise ExactQuotientFailed(f, g, f.ring)
        return res
def quo ( f , g ) : if isinstance ( g , DMP ) : lev , dom , per , ( F_num , F_den ) , G = f . poly_unify ( g ) num , den = F_num , dmp_mul ( F_den , G , lev , dom ) else : lev , dom , per , F , G = f . frac_unify ( g ) ( F_num , F_den ) , ( G_num , G_den ) = F , G num = dmp_mul ( F_num , G_den , lev , dom ) den = dmp_mul ( F_den , G_num , lev , dom ) res = per ( num , den ) if f . ring is not None and res not in f . ring : from sympy . polys . polyerrors import ExactQuotientFailed raise ExactQuotientFailed ( f , g , f . ring ) return res