Lines Matching refs:__num
46 self.__num = int(num//g)
51 return self.__num
61 return "Rat(%d, %d)" % (self.__num, self.__den)
69 return self.__num*1.0/self.__den
75 return int(self.__num)
86 return Rat(self.__num*other.__den + other.__num*self.__den,
99 return Rat(self.__num*other.__den - other.__num*self.__den,
110 return Rat(other.__num*self.__den - self.__num*other.__den,
119 return Rat(self.__num*other.__num, self.__den*other.__den)
121 return Rat(self.__num*other, self.__den)
131 return Rat(self.__num*other.__den, self.__den*other.__num)
133 return Rat(self.__num, self.__den*other)
141 return Rat(other.__num*self.__den, other.__den*self.__num)
143 return Rat(other*self.__den, self.__num)
155 return x.__num // x.__den
160 return x.__num // x.__den
190 return self.__den == 1 and self.__num == other
192 return self.__num == other.__num and self.__den == other.__den