This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]