(a, b)
return Fraction(t // g2, s * (db // g2), _normalize=False)
a + b
a + b
a + b
def _add(a, b):
        """a + b"""
        na, da = a.numerator, a.denominator
        nb, db = b.numerator, b.denominator
        g = math.gcd(da, db)
        if g == 1:
            return Fraction(na * db + da * nb, da * db, _normalize=False)
        s = da // g
        t = na * (db // g) + nb * s
        g2 = math.gcd(t, g)
        if g2 == 1:
            return Fraction(t, s * db, _normalize=False)
        return Fraction(t // g2, s * (db // g2), _normalize=False)
def _add ( a , b ) : na , da = a . numerator , a . denominator nb , db = b . numerator , b . denominator g = math . gcd ( da , db ) if g == 1 : return Fraction ( na * db + da * nb , da * db , _normalize = False ) s = da // g t = na * ( db // g ) + nb * s g2 = math . gcd ( t , g ) if g2 == 1 : return Fraction ( t , s * db , _normalize = False ) return Fraction ( t // g2 , s * ( db // g2 ) , _normalize = False )