On 2005-03-07 17:09:46 +0100, Duncan Sands wrote: > Mathematically speaking zero^zero is undefined, so it should be NaN. [...]
Mathematically, this is just about conventions. But the main problem here is that the power function is overloaded. For instance, you can use pow() to compute x^i, where i is an integer, and in this case, having x^0 = 1 is natural. Of course, cpow is not pow, but you have the idea. BTW, in <http://www.inria.fr/rrrt/rr-5406.html> [RR-5406 - Proposal for a Standardization of Mathematical Function Implementation in Floating-Point Arithmetic], we said: On the one hand, as said above, there is no way of defining 0^0 using continuity, but on the other hand, many important properties remain satisfied if we choose 0^0 = 1 (which is frequently adopted, as a convention, by mathematicians). Kahan suggests to choose 0^0 = 1. [...] -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / SPACES project at LORIA