Lines Matching refs:_denominator
120 self._denominator = 1
125 self._denominator = numerator.denominator
130 self._numerator, self._denominator = numerator.as_integer_ratio()
190 self._denominator = denominator
253 if self._denominator <= max_denominator:
257 n, d = self._numerator, self._denominator
280 return a._denominator
285 self._numerator, self._denominator)
289 if self._denominator == 1:
292 return '%s/%s' % (self._numerator, self._denominator)
461 a._denominator ** power,
464 return Fraction(a._denominator ** -power,
468 return Fraction((-a._denominator) ** -power,
480 if b._denominator == 1 and b._numerator >= 0:
487 if b._denominator == 1:
494 return Fraction(a._numerator, a._denominator, _normalize=False)
498 return Fraction(-a._numerator, a._denominator, _normalize=False)
502 return Fraction(abs(a._numerator), a._denominator, _normalize=False)
507 return -(-a._numerator // a._denominator)
509 return a._numerator // a._denominator
559 dinv = pow(self._denominator, _PyHASH_MODULUS - 2, _PyHASH_MODULUS)
570 return a._numerator == b and a._denominator == 1
573 a._denominator == b.denominator)
601 self._denominator * other.numerator)
638 return self.__class__(self._numerator, self._denominator)
643 return self.__class__(self._numerator, self._denominator)