(a, b)
return Fraction(na * nb, db * da, _normalize=False)
a * b
a * b
a * b
def _mul(a, b):
        """a * b"""
        na, da = a.numerator, a.denominator
        nb, db = b.numerator, b.denominator
        g1 = math.gcd(na, db)
        if g1 > 1:
            na //= g1
            db //= g1
        g2 = math.gcd(nb, da)
        if g2 > 1:
            nb //= g2
            da //= g2
        return Fraction(na * nb, db * da, _normalize=False)
def _mul ( a , b ) : na , da = a . numerator , a . denominator nb , db = b . numerator , b . denominator g1 = math . gcd ( na , db ) if g1 > 1 : na //= g1 db //= g1 g2 = math . gcd ( nb , da ) if g2 > 1 : nb //= g2 da //= g2 return Fraction ( na * nb , db * da , _normalize = False )