summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-96/e_j1l.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/e_j1l.c')
-rw-r--r--sysdeps/ieee754/ldbl-96/e_j1l.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-96/e_j1l.c b/sysdeps/ieee754/ldbl-96/e_j1l.c
index 1bca949e5a..e8a7349cf4 100644
--- a/sysdeps/ieee754/ldbl-96/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-96/e_j1l.c
@@ -155,6 +155,8 @@ __ieee754_j1l (long double x)
 	{
 	  long double ret = 0.5 * x;
 	  math_check_force_underflow (ret);
+	  if (ret == 0 && x != 0)
+	    __set_errno (ERANGE);
 	  return ret;
 	}
     }