diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_j1.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_j1.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c index bc7ca0609f..b7b8a9a644 100644 --- a/sysdeps/ieee754/dbl-64/e_j1.c +++ b/sysdeps/ieee754/dbl-64/e_j1.c @@ -58,6 +58,7 @@ * by method mentioned above. */ +#include <errno.h> #include <math.h> #include <math_private.h> @@ -205,7 +206,10 @@ __ieee754_y1 (double x) } if (__glibc_unlikely (ix <= 0x3c900000)) /* x < 2**-54 */ { - return (-tpi / x); + z = -tpi / x; + if (__isinf (z)) + __set_errno (ERANGE); + return z; } z = x * x; u1 = U0[0] + z * U0[1]; z2 = z * z; |