about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/e_exp2f.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_exp2f.c')
-rw-r--r--sysdeps/ieee754/flt-32/e_exp2f.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c
index 01cd4441a4..f3e3a8e6fc 100644
--- a/sysdeps/ieee754/flt-32/e_exp2f.c
+++ b/sysdeps/ieee754/flt-32/e_exp2f.c
@@ -54,6 +54,9 @@ __ieee754_exp2f (float x)
       float rx, x22, result;
       union ieee754_float ex2_u, scale_u;
 
+      if (fabsf (x) < FLT_EPSILON / 4.0f)
+	return 1.0f + x;
+
       {
 	SET_RESTORE_ROUND_NOEXF (FE_TONEAREST);