About the GCD operator, the Haskell Report currently says:

"gcd x y is the greatest integer that divides both x and y. 
lcm x y is the smallest positive integer that both x and y divide."

Why does 'lcm' say 'positive' while 'gcd' does not?  What is

        gcd -3 -6

Presumably 3, not -3.   You could say that is obvious, since 3 > -3.

So I propose to add "positive" to the gcd spec:

        gcd x y is the greatest POSITIVE integer 
        that divides both x and y. 

I don't think that changes the specification in fact, but experience
has led me to always check these things!

Simon

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to