Hi Paolo, > > 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).
aren't __builtin_cpow and friends language independent? I mean, if a front-end sees a x^y then presumably it ends up being turned into a call to a __builtin_?pow by the back-end. If so, then conforming to the C99 and C++ standards isn't enough: the standards for all gcc supported languages need to be checked. Since some of them require one, as long as none of the others requires something else then it is clear that one should be returned. But do any other languages require something else? All the best, Duncan.