Lines Matching refs:gcd
15 gcd = fractions.gcd variable
53 g = math.gcd(num, den)
89 gcd(1, 1)
93 self.assertEqual(0, gcd(0, 0))
94 self.assertEqual(1, gcd(1, 0))
95 self.assertEqual(-1, gcd(-1, 0))
96 self.assertEqual(1, gcd(0, 1))
97 self.assertEqual(-1, gcd(0, -1))
98 self.assertEqual(1, gcd(7, 1))
99 self.assertEqual(-1, gcd(7, -1))
100 self.assertEqual(1, gcd(-23, 15))
101 self.assertEqual(12, gcd(120, 84))
102 self.assertEqual(-12, gcd(84, -120))
103 self.assertEqual(gcd(120.0, 84), 12.0)
104 self.assertEqual(gcd(120, 84.0), 12.0)
105 self.assertEqual(gcd(F(120), F(84)), F(12))
106 self.assertEqual(gcd(F(120, 77), F(84, 55)), F(12, 385))