Returns the greatest common divisor of integers and rationals (and Gaussian integers)
GCD[12, 8]
The GCD of 12 and 8 is 4.
GCD[48, 18]
The GCD of 48 and 18 is 6.
GCD[100, 50]
The GCD of 100 and 50 is 50.
GCD[17, 19]
The GCD of 17 and 19 is 1 (coprime numbers).
GCD[0, 5]
The GCD of 0 and any number n is |n|.
GCD[15, 25, 35]
The GCD of 15, 25, and 35 is 5.
GCD[24, 36, 60]
The GCD of 24, 36, and 60 is 12.
GCD[-12, 8]
The GCD works with negative numbers (GCD of -12 and 8 is 4).
GCD[21, 14]
The GCD of 21 and 14 is 7.
GCD[7 + 3 I, 2]
GCD also works over the Gaussian integers, returning the canonical associate.
GCD[12, 8]
→ 4GCD[48, 18]
→ 6GCD[100, 50]
→ 50GCD[17, 19]
→ 1GCD[0, 5]
→ 5GCD[15, 25, 35]
→ 5GCD[24, 36, 60]
→ 12GCD[-12, 8]
→ 4GCD[21, 14]
→ 7GCD[7 + 3 I, 2]
→ 1 + I