[Bug libstdc++/50880] New: __complex_acosh() picks wrong complex branch

kreckel at ginac dot de gcc-bugzilla@gcc.gnu.org
Thu Oct 27 07:09:00 GMT 2011


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

             Bug #: 50880
           Summary: __complex_acosh() picks wrong complex branch
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kreckel@ginac.de


According to the C++ standard, acosh(complex<T>) should behave just like C99's
cacosh(T complex) function. There, the branch cut is "at values less than 1
along the real axis" and 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."

The implementation in tr1/complex gets this wrong. The result returned by
__complex_acosh() are all wrong in the lower complex plain. It can be easily
fixed. I'm attaching a patch.



More information about the Gcc-bugs mailing list