diff options
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_exp2f.c')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_exp2f.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c index 0b75a7ea2a..bc62042966 100644 --- a/sysdeps/ieee754/flt-32/e_exp2f.c +++ b/sysdeps/ieee754/flt-32/e_exp2f.c @@ -109,7 +109,15 @@ __ieee754_exp2f (float x) if (!unsafe) return result; else - return result * scale_u.f; + { + result *= scale_u.f; + if (result < FLT_MIN) + { + float force_underflow = result * result; + math_force_eval (force_underflow); + } + return result; + } } /* Exceptional cases: */ else if (isless (x, himark)) |