[Bug math/23998] New: atanh returns negative NaN for positive values outside -1 < x < 1 domain

ubizjak at gmail dot com sourceware-bugzilla@sourceware.org
Mon Dec 17 08:12:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=23998

            Bug ID: 23998
           Summary: atanh returns negative NaN for positive values outside
                    -1 < x < 1 domain
           Product: glibc
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: ubizjak at gmail dot com
  Target Milestone: ---

atanh(1.5) returns -nan, as shown by the following example:

--cut here--
#include <math.h>
#include <stdio.h>

int
main ()
{
  double res;

  res = atanh (-1.5);
  printf ("%f\n", res);
  res = atanh (1.5);
  printf ("%f\n", res);

  return 0;
}
--cut here--

$ ./a.out 
-nan
-nan

One would expect positive NaN for positive values > 1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list