Lines Matching refs:gcd
14 gcd = fractions.gcd variable
60 g = gcd(num, den)
98 self.assertEqual(0, gcd(0, 0))
99 self.assertEqual(1, gcd(1, 0))
100 self.assertEqual(-1, gcd(-1, 0))
101 self.assertEqual(1, gcd(0, 1))
102 self.assertEqual(-1, gcd(0, -1))
103 self.assertEqual(1, gcd(7, 1))
104 self.assertEqual(-1, gcd(7, -1))
105 self.assertEqual(1, gcd(-23, 15))
106 self.assertEqual(12, gcd(120, 84))
107 self.assertEqual(-12, gcd(84, -120))