From: Lars Henrik Mathiesen <[EMAIL PROTECTED]>
Date: 17 Dec 2001 14:50:21 -
...
In case it isn't clear already, these definitions make a lattice on
the positive integers, with divides ~ leq, gcd ~ meet and lcm ~ join,
using the report's definitions of gcd and lcm.
Indeed, t
From: "Simon Peyton-Jones" <[EMAIL PROTECTED]>
Date: Fri, 14 Dec 2001 01:18:56 -0800
...
If someone could write a sentence or two to explain why gcd 0 0 = 0,
(ideally, brief ones I can put in the report by way of explanation),
I think that might help those of us who have not foll
From: "S.D.Mechveliani" <[EMAIL PROTECTED]>
Date: Thu, 13 Dec 2001 12:53:32 +0300
Further, the definintion
> gcd(x, y) to be the smallest
> z >= 0 such that {m*x + n*y | m, n in Z} = {n*z | n in Z}
is not natural. In particular, how does it generalize to gcd X Y
for po
From: George Russell <[EMAIL PROTECTED]>
Date: Tue, 11 Dec 2001 18:18:31 +0100
...
Yes. The Report definition says
gcd :: (Integral a) => a -> a -> a
gcd 0 0 = error "Prelude.gcd: gcd 0 0 is undefined"
gcd x y = gcd' (abs x) (abs y)