Lines Matching refs:gcd
6 def gcd(a, b):
44 g = gcd(den, num)
217 self.assertEqual(gcd(10, 12), 2)
218 self.assertEqual(gcd(10, 15), 5)
219 self.assertEqual(gcd(10, 11), 1)
220 self.assertEqual(gcd(100, 15), 5)
221 self.assertEqual(gcd(-10, 2), -2)
222 self.assertEqual(gcd(10, -2), 2)
223 self.assertEqual(gcd(-10, -2), -2)
226 self.assertTrue(gcd(i, j) > 0)
227 self.assertTrue(gcd(-i, j) < 0)
228 self.assertTrue(gcd(i, -j) > 0)
229 self.assertTrue(gcd(-i, -j) < 0)