about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/dbl-64/e_exp10.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/e_exp10l.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_exp10l.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_exp10.c b/sysdeps/ieee754/dbl-64/e_exp10.c
index eac609b71d..59cb2ffd4a 100644
--- a/sysdeps/ieee754/dbl-64/e_exp10.c
+++ b/sysdeps/ieee754/dbl-64/e_exp10.c
@@ -35,6 +35,8 @@ __ieee754_exp10 (double arg)
     return DBL_MIN * DBL_MIN;
   else if (arg > DBL_MAX_10_EXP + 1)
     return DBL_MAX * DBL_MAX;
+  else if (fabs (arg) < 0x1p-56)
+    return 1.0;
 
   GET_LOW_WORD (lx, arg);
   lx &= 0xf8000000;
diff --git a/sysdeps/ieee754/ldbl-128/e_exp10l.c b/sysdeps/ieee754/ldbl-128/e_exp10l.c
index 3c5096379c..da7099559d 100644
--- a/sysdeps/ieee754/ldbl-128/e_exp10l.c
+++ b/sysdeps/ieee754/ldbl-128/e_exp10l.c
@@ -35,6 +35,8 @@ __ieee754_exp10l (long double arg)
     return LDBL_MIN * LDBL_MIN;
   else if (arg > LDBL_MAX_10_EXP + 1)
     return LDBL_MAX * LDBL_MAX;
+  else if (fabsl (arg) < 0x1p-116L)
+    return 1.0L;
 
   u.value = arg;
   u.parts64.lsw &= 0xfe00000000000000LL;
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c b/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c
index 5c68eb57b1..a0e8a3e610 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c
@@ -35,6 +35,8 @@ __ieee754_exp10l (long double arg)
     return LDBL_MIN * LDBL_MIN;
   else if (arg > LDBL_MAX_10_EXP + 1)
     return LDBL_MAX * LDBL_MAX;
+  else if (fabsl (arg) < 0x1p-109L)
+    return 1.0L;
 
   u.ld = arg;
   arg_high = u.d[0].d;