def to_continuous(self):
     for quotient, remainder in rational_math.euclidean_algorithm(
             self.p, self.q):
         yield quotient
Exemplo n.º 2
0
 def test_euclidean_coefficients(self):
     expected_result = [(2, 147), (3, 21), (7, 0)]
     actual_result = rational_math.euclidean_algorithm(1071, 462)
     for actual, expected in zip(actual_result, expected_result):
         self.assertEqual(actual, expected)
 def to_continuous(self):
     for quotient, remainder in rational_math.euclidean_algorithm(self.p,
                                                                  self.q):
         yield quotient