about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j1l.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/e_jnl.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 70ecf5eae3..f5b04c073d 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -701,6 +701,8 @@ __ieee754_j1l (long double x)
     {
       long double ret = x * 0.5L;
       math_check_force_underflow (ret);
+      if (ret == 0)
+	__set_errno (ERANGE);
       return ret;
     }
   if (xx <= 2.0L)
diff --git a/sysdeps/ieee754/ldbl-128/e_jnl.c b/sysdeps/ieee754/ldbl-128/e_jnl.c
index ee5a16b62e..98669e6e3e 100644
--- a/sysdeps/ieee754/ldbl-128/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128/e_jnl.c
@@ -296,7 +296,10 @@ __ieee754_jnl (int n, long double x)
       ret = b;
   }
   if (ret == 0)
-    ret = __copysignl (LDBL_MIN, ret) * LDBL_MIN;
+    {
+      ret = __copysignl (LDBL_MIN, ret) * LDBL_MIN;
+      __set_errno (ERANGE);
+    }
   else
     math_check_force_underflow (ret);
   return ret;