Lines Matching refs:Fraction
44 class Fraction(Rational): class
99 self = super(Fraction, cls).__new__(cls)
109 value = Fraction.from_float(numerator)
115 value = Fraction.from_decimal(numerator)
241 return Fraction(self)
254 bound1 = Fraction(p0+k*p1, q0+k*q1)
255 bound2 = Fraction(p1, q1)
361 if isinstance(b, (int, long, Fraction)):
389 return Fraction(a.numerator * b.denominator +
397 return Fraction(a.numerator * b.denominator -
405 return Fraction(a.numerator * b.numerator, a.denominator * b.denominator)
411 return Fraction(a.numerator * b.denominator,
463 return Fraction(a._numerator ** power,
466 return Fraction(a._denominator ** -power,
482 return Fraction(a.numerator, a.denominator) ** b
491 return Fraction(a._numerator, a._denominator)
495 return Fraction(-a._numerator, a._denominator)
499 return Fraction(abs(a._numerator), a._denominator)
598 if type(self) == Fraction:
603 if type(self) == Fraction: