http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57749

--- Comment #13 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
We all whould have read the manual first:

>From 'man cpow'

...
DESCRIPTION
     cpow(x, y) returns the complex number x raised to the complex power y.

     cpow(x,y) is equivalent to cexp(y * clog(x)).  As such, cpow(x, y) has
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     a branch cut along the negative real axis for the first argument, and
     the equality cpow(conj(x),conj(y)) = conj(cpow(x,y)) holds for all x
     and y.

SPECIAL VALUES
     For special values, see clog and cexp.
...

>From 'man clog'

...
SPECIAL VALUES
     The conjugate symmetry of clog() is used to abbreviate the specification
of special values.

     clog(-0 + 0i) returns -inf + Pi i and raises the divide-by-zero flag.

     clog(0 + 0i) returns -inf + 0i and raises the divide-by-zero flag.
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

>From 'man cexp'

...
SPECIAL VALUES
...
For the following two cases, cis(y) denotes cos(y) + I*sin(y).

cexp(-inf + yi) returns 0*cis(y), for finite y.
...

So this PR is not a bug, but a documented feature, and should be closed as
INVALID.

Reply via email to