about summary refs log tree commit diff
path: root/sysdeps/generic/w_exp2l.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/w_exp2l.c')
-rw-r--r--sysdeps/generic/w_exp2l.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/generic/w_exp2l.c b/sysdeps/generic/w_exp2l.c
index 965e9bf3e4..f492301223 100644
--- a/sysdeps/generic/w_exp2l.c
+++ b/sysdeps/generic/w_exp2l.c
@@ -7,7 +7,8 @@
 #include "math_private.h"
 
 static const long double o_threshold = (long double) LDBL_MAX_EXP;
-static const long double u_threshold = (long double) LDBL_MIN_EXP;
+static const long double u_threshold
+  = (long double) (LDBL_MIN_EXP - LDBL_MANT_DIG - 1);
 
 long double
 __exp2l (long double x)			/* wrapper exp2l */
@@ -21,7 +22,7 @@ __exp2l (long double x)			/* wrapper exp2l */
     {
       if (x > o_threshold)
 	return __kernel_standard (x, x, 244); /* exp2l overflow */
-      else if (x < u_threshold)
+      else if (x <= u_threshold)
 	return __kernel_standard (x, x, 245); /* exp2l underflow */
     }
   return z;