diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_exp2.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_exp2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_exp2.c b/sysdeps/ieee754/dbl-64/e_exp2.c index 30f0a8f529..01df62150d 100644 --- a/sysdeps/ieee754/dbl-64/e_exp2.c +++ b/sysdeps/ieee754/dbl-64/e_exp2.c @@ -120,7 +120,15 @@ __ieee754_exp2 (double x) if (!unsafe) return result; else - return result * scale_u.d; + { + result *= scale_u.d; + if (result < DBL_MIN) + { + double force_underflow = result * result; + math_force_eval (force_underflow); + } + return result; + } } else /* Return x, if x is a NaN or Inf; or overflow, otherwise. */ |