__builtin_cpow((0,0),(0,0))
Paolo Carlini
pcarlini@suse.de
Mon Mar 7 14:20:00 GMT 2005
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.
More information about the Gcc
mailing list