about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_expm1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_expm1.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c
index 9c9bb34559..41ef63a786 100644
--- a/sysdeps/ieee754/dbl-64/s_expm1.c
+++ b/sysdeps/ieee754/dbl-64/s_expm1.c
@@ -109,6 +109,7 @@
  */
 
 #include <errno.h>
+#include <float.h>
 #include <math.h>
 #include <math_private.h>
 #define one Q[0]
@@ -194,6 +195,11 @@ __expm1 (double x)
     }
   else if (hx < 0x3c900000)             /* when |x|<2**-54, return x */
     {
+      if (fabs (x) < DBL_MIN)
+	{
+	  double force_underflow = x * x;
+	  math_force_eval (force_underflow);
+	}
       t = huge + x;     /* return x with inexact flags when x!=0 */
       return x - (t - (huge + x));
     }