Well, you are right, this discussion becomes a bit off topic.
I think 0^0 should be 1 in the complex case, too. Otherwise the complex
and real definitions would collide.
Example:
use complex number 0+i*0 then this should be handled equivalent to the
real number 0. Otherwise the programmer would get quite irritated if he
transforms real numbers into equivalent complex numbers (a -> a+i*0).
Paolo Carlini wrote:
Chris Jefferson wrote:
What we are debating here isn't really maths at all, just the
definition which will be most useful and least suprising (and perhaps
also what various standards tell us to use).
Also, since we are definitely striving to consistently implement the
current C99 and C++ Standards, it's *totally* pointless discussing 0^0
in the real domain: it *must* be one. Please, people, don't overflow
the gcc development list with this kind of discussion. I feel guilty
because of that, by the way: please, accept my apologies. My original
question was *only* about consistency between the real case (pow) and
the complex case (cpow, __builtin_cpow, std::complex::pow).
Paolo.