diff options
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_j1f.c')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_j1f.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c index 7ffb57e806..63de21f609 100644 --- a/sysdeps/ieee754/flt-32/e_j1f.c +++ b/sysdeps/ieee754/flt-32/e_j1f.c @@ -14,6 +14,7 @@ */ #include <errno.h> +#include <float.h> #include <math.h> #include <math_private.h> @@ -69,7 +70,14 @@ __ieee754_j1f(float x) else return z; } if(__builtin_expect(ix<0x32000000, 0)) { /* |x|<2**-27 */ - if(huge+x>one) return (float)0.5*x;/* inexact if x!=0 necessary */ + if(huge+x>one) { /* inexact if x!=0 necessary */ + float ret = (float) 0.5 * x; + if (fabsf (ret) < FLT_MIN) { + float force_underflow = ret * ret; + math_force_eval (force_underflow); + } + return ret; + } } z = x*x; r = z*(r00+z*(r01+z*(r02+z*r03))); |