This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
__builtin_cpow((0,0),(0,0))
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc at gcc dot gnu dot org
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 07 Mar 2005 15:23:41 +0100
- Subject: __builtin_cpow((0,0),(0,0))
Hi everyone,
why the result is (0,0) instead of (1,0)?!? It seems to me that only the
latter is consistent with the C99 requirements for real power (F.9.4.4)
- that is 1.0 - and, on the other hand, according to G.6.4.1 and note
318, cpow behavior in "special cases" is rather implementation dependent...
I'm asking because, in the C++ library we are trying to make consistent
use of both pow and __builtin_cpow in the implementation of
complex::pow, and as soon as you deal with "special cases", issues like
the above surface quickly.
Thanks,
Paolo.