(f, g)
return per(num, den)
Multiply two multivariate fractions ``f`` and ``g``.
Multiply two multivariate fractions ``f`` and ``g``.
Multiply two multivariate fractions f and g .
def mul(f, g):
        """Multiply two multivariate fractions ``f`` and ``g``. """
        if isinstance(g, DMP):
            lev, dom, per, (F_num, F_den), G = f.poly_unify(g)
            num, den = dmp_mul(F_num, G, lev, dom), F_den
        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_num, lev, dom)
            den = dmp_mul(F_den, G_den, lev, dom)

        return per(num, den)
def mul ( f , g ) : if isinstance ( g , DMP ) : lev , dom , per , ( F_num , F_den ) , G = f . poly_unify ( g ) num , den = dmp_mul ( F_num , G , lev , dom ) , F_den 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_num , lev , dom ) den = dmp_mul ( F_den , G_den , lev , dom ) return per ( num , den )