Important Corner Case


#1

If k is a non-zero integer, then k divides zero. the largest common divisor of k and zero is k. So gcd(k, 0) = gcd(0,k) = k. However, gcd(0, 0) isn’t defined.

Quoting above from this pdf.


#2

gcd(0, 0) = 2147483647


#3

Correction:gcd(0,0) is 0.