Something that perhaps could be added is that leaving  0 `gcd` 0  undefined has two obvious annoying consequences: gcd is no longer idempotent (i.e. we don&#39;t have a `gcd` a = a, for all a), and it is no longer associative ((a `gcd` 0) `gcd` 0 is well-defined whilst a `gcd` (0 `gcd` 0) is not).<br>
<br>(We actually wrote something about this on a recent paper. If you&#39;re interested, see  <a href="http://www.joaoff.com/publications/2009/euclid-alg">http://www.joaoff.com/publications/2009/euclid-alg</a> )<br><br>Regards,<br>
Joao<br><br><div class="gmail_quote">2009/5/3 Nathan Bloomfield <span dir="ltr">&lt;<a href="mailto:nbloomf@gmail.com">nbloomf@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">&gt; This, to defend myself, was not how it was explained in high school.<br><br></div>No worries. I didn&#39;t realize this myself until college; most nonspecialist teachers just don&#39;t know any better. Nor did, it appears, the original authors of the Haskell Prelude. :)<br>

<br>BTW, this definition of gcd makes it possible to consider gcds in rings that otherwise have no natural order- such as rings of polynomials in several variables, group rings, et cetera.<br><font color="#888888"><br>Nathan Bloomfield</font><div>
<div></div><div class="h5"><br><br>
<div class="gmail_quote">On Sun, May 3, 2009 at 11:16 AM, Achim Schneider <span dir="ltr">&lt;<a href="mailto:barsoap@web.de" target="_blank">barsoap@web.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>Nathan Bloomfield &lt;<a href="mailto:nbloomf@gmail.com" target="_blank">nbloomf@gmail.com</a>&gt; wrote:<br>
<br>
&gt; The &quot;greatest&quot; in gcd is not w.r.t. the canonical ordering on the<br>
&gt; naturals; rather w.r.t. the partial order given by the divides<br>
&gt; relation.<br>
&gt;<br>
</div>This, to defend myself, was not how it was explained in high school.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div>(c) this sig last receiving data processing entity. Inspect headers<br>
for copyright history. All rights reserved. Copying, hiring, renting,<br>
performance and/or quoting of this signature prohibited.<br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>