10 Feb
2014
10 Feb
'14
5:08 p.m.
That's the counterexample for gcd(a,b) = gcd(a-b,b)? It works for a=0, for b=0, for a=b=0, and for a=b: gcd(0,b) = gcd(-b,b) = |b| gcd(a,0) = gcd(a-0,0) = |a| gcd(0,0) = gcd(0-0,0) = 0 gcd(a,a) = gcd(0,a) = |a| Seems to work. I don't see this as the same as defining n/0 to be n. Tom Mike Speciner writes:
And, as I recall, many early computers said n/0 = n.
If gcd(0,0) = 0, then it is not universally true that gcd(a,b)=gcd(a-b,b).
On 2014-02-10 11:06, Henry Baker wrote:
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.