about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_log1pl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_log1pl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
index a346383052..e4bb6e8d9b 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
@@ -140,7 +140,10 @@ __log1pl (long double xm1)
   if (((hx & 0x7fffffff) | lx) == 0)
     return xm1;
 
-  x = xm1 + 1.0L;
+  if (xm1 >= 0x1p107L)
+    x = xm1;
+  else
+    x = xm1 + 1.0L;
 
   /* log1p(-1) = -inf */
   if (x <= 0.0L)