https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87247

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #1)
> I think there are two issues here, one is the glibc also puts the result in
> the wrong quadrant.  The other issue is the GCC's constant folding does too.
> What is interesting is they both put in the same quadrant though.
> 
> I cannot comment if this is a bug because I don't have a copy of the IEEE
> spec and/or C11 spec too.

It's a bug in the Fortran Standard.  OP should send an interpretation
request to J3.  n1256.pdf has

7.3.6 Hyperbolic functions

7.3.6.1 The cacosh functions

The cacosh functions compute the complex arc hyperbolic cosine
of z, with a branch cut at values less than 1 along the real axis.

The cacosh functions return the complex arc hyperbolic cosine value,
in the range of a half-strip of non-negative values along the real
axis and in the interval [-i pi, +i pi] along the imaginary axis.

Reply via email to