10 Feb
2014
10 Feb
'14
9:41 a.m.
Wikipedia has this to say about gcd(0,0) and lcm(0,0): It is sometimes useful to define gcd(0, 0) = 0 and lcm(0, 0) = 0 because then the natural numbers become a complete distributive lattice with gcd as meet and lcm as join operation. This extension of the definition is also compatible with the generalization for commutative rings given below. I don't have Mathematica, but Wolfram Alpha also gives 0 for these. Tom Henry Baker writes:
At 07:08 AM 2/10/2014, Mike Speciner wrote:
gcd(0,0) = 0 ???
I always thought a positive integer was prime iff it had exactly two positive integer divisors.
Common Lisp & Maxima say gcd(0,0)=0.