about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/s_log1pl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_log1pl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_log1pl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c
index b70a55b758..ff759bc000 100644
--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c
@@ -53,6 +53,7 @@
     <http://www.gnu.org/licenses/>.  */
 
 
+#include <float.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -140,6 +141,11 @@ __log1pl (long double xm1)
 
   if ((hx & 0x7fffffff) < 0x3f8e0000)
     {
+      if (fabsl (xm1) < LDBL_MIN)
+	{
+	  long double force_underflow = xm1 * xm1;
+	  math_force_eval (force_underflow);
+	}
       if ((int) xm1 == 0)
 	return xm1;
     }