On the lisp level (expt 0.0 0.0) gives an error, at least in the lisp I
tried.
As a practical matter, returning 0 for gcd(0,0) works. Signalling an error
would make life more difficult because some program would have to catch the
error and do something more useful with it than returning 0.
Also, some people claim that the answer 0 is technically correct (e.g. D.E.
Knuth)
http://www.haskell.org/pipermail/haskell/2001-December/008588.html
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu [mailto:maxima-
> bounces at math.utexas.edu] On Behalf Of van Nek
> Sent: Sunday, November 26, 2006 2:56 AM
> To: Maxima at math.utexas.edu
> Subject: question about gcd(0,0)
>
> hello,
> does the answer make sense?
>
> (%i1) gcd(0,0);
> (%o1) 0
>
> zero as a divisor? We have on lisp level
>
> (%i2) :lisp (gcd 0 0)
> 0
> (%i2) :lisp (expt 0 0)
> 1
>
> but on Maxima level
>
> (%i2) 0^0;
> 0
> 0 has been generated
> -- an error. Quitting. To debug this try debugmode(true);
>
> shouldn't gcd(0,0) throw an error message like we have it in case of 0^0 ?
> Volker van Nek
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima