__builtin_cpow((0,0),(0,0))
Paolo Carlini
pcarlini@suse.de
Tue Mar 8 00:20:00 GMT 2005
Robert Dewar wrote:
> However, the one chosen by the C standard has indeed become pretty
> prevalent (the Ada RM for instance specifies that 0**0 = 1 (applies
> to complex case as well).
Interesting, thanks. The problem is, since the C standard is admittedly
rather vague in this area, some implementation of the C library simply
implement the basic formula (i.e., cexp(c*clog(z))) and don't deal *at all*
with special cases. This leads *naturally* to (nan, nan).
In other cases we are more "lucky", though
http://docs.hp.com/en/B2355-60103/cpow.3M.html
Paolo.
More information about the Libstdc++
mailing list