diff options
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_asinf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_atanhf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_exp2f.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_gammaf_r.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_j1f.c | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_jnf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_sinhf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/k_sinf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/k_tanf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/s_asinhf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/s_atanf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/s_erff.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/s_expm1f.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/s_log1pf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/s_tanhf.c | 6 |
15 files changed, 16 insertions, 73 deletions
diff --git a/sysdeps/ieee754/flt-32/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c index 00bad4239b..2ca2dbcb28 100644 --- a/sysdeps/ieee754/flt-32/e_asinf.c +++ b/sysdeps/ieee754/flt-32/e_asinf.c @@ -73,11 +73,7 @@ float __ieee754_asinf(float x) return (x-x)/(x-x); /* asin(|x|>1) is NaN */ } else if (ix<0x3f000000) { /* |x|<0.5 */ if(ix<0x32000000) { /* if |x| < 2**-27 */ - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); if(huge+x>one) return x;/* return x with inexact if x!=0*/ } else { t = x*x; diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c index bc74960e16..77e4b03c75 100644 --- a/sysdeps/ieee754/flt-32/e_atanhf.c +++ b/sysdeps/ieee754/flt-32/e_atanhf.c @@ -52,11 +52,7 @@ __ieee754_atanhf (float x) if (__glibc_unlikely (xa < 0x1.0p-28f)) { math_force_eval (huge + x); - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x; } diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c index 170c565895..d8e7a9c8bc 100644 --- a/sysdeps/ieee754/flt-32/e_exp2f.c +++ b/sysdeps/ieee754/flt-32/e_exp2f.c @@ -111,11 +111,7 @@ __ieee754_exp2f (float x) else { result *= scale_u.f; - if (result < FLT_MIN) - { - float force_underflow = result * result; - math_force_eval (force_underflow); - } + math_check_force_underflow_nonneg (result); return result; } } diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c index 183db1e033..f97ca34705 100644 --- a/sysdeps/ieee754/flt-32/e_gammaf_r.c +++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c @@ -179,11 +179,7 @@ __ieee754_gammaf_r (float x, int *signgamp) float tret = (float) M_PI / (-x * sinpix * gammaf_positive (-x, &exp2_adj)); ret = __scalbnf (tret, -exp2_adj); - if (ret < FLT_MIN) - { - float force_underflow = ret * ret; - math_force_eval (force_underflow); - } + math_check_force_underflow_nonneg (ret); } } ret = math_narrow_eval (ret); diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c index 63de21f609..e24024f22e 100644 --- a/sysdeps/ieee754/flt-32/e_j1f.c +++ b/sysdeps/ieee754/flt-32/e_j1f.c @@ -72,10 +72,7 @@ __ieee754_j1f(float x) if(__builtin_expect(ix<0x32000000, 0)) { /* |x|<2**-27 */ 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); - } + math_check_force_underflow (ret); return ret; } } diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c index 44a3761adb..d18922aa05 100644 --- a/sysdeps/ieee754/flt-32/e_jnf.c +++ b/sysdeps/ieee754/flt-32/e_jnf.c @@ -170,10 +170,8 @@ __ieee754_jnf(int n, float x) } if (ret == 0) ret = __copysignf (FLT_MIN, ret) * FLT_MIN; - else if (fabsf (ret) < FLT_MIN) { - float force_underflow = ret * ret; - math_force_eval (force_underflow); - } + else + math_check_force_underflow (ret); return ret; } strong_alias (__ieee754_jnf, __jnf_finite) diff --git a/sysdeps/ieee754/flt-32/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c index a24fa0c4bc..6100d95c55 100644 --- a/sysdeps/ieee754/flt-32/e_sinhf.c +++ b/sysdeps/ieee754/flt-32/e_sinhf.c @@ -36,11 +36,7 @@ __ieee754_sinhf(float x) /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */ if (ix < 0x41b00000) { /* |x|<22 */ if (__builtin_expect(ix<0x31800000, 0)) { /* |x|<2**-28 */ - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */ } t = __expm1f(fabsf(x)); diff --git a/sysdeps/ieee754/flt-32/k_sinf.c b/sysdeps/ieee754/flt-32/k_sinf.c index 0c98a2ae91..a195d59466 100644 --- a/sysdeps/ieee754/flt-32/k_sinf.c +++ b/sysdeps/ieee754/flt-32/k_sinf.c @@ -38,11 +38,7 @@ float __kernel_sinf(float x, float y, int iy) ix &= 0x7fffffff; /* high word of x */ if(ix<0x32000000) /* |x| < 2**-27 */ { - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); if ((int) x == 0) return x; /* generate inexact */ } diff --git a/sysdeps/ieee754/flt-32/k_tanf.c b/sysdeps/ieee754/flt-32/k_tanf.c index 2f2076d6fe..9f0e55860f 100644 --- a/sysdeps/ieee754/flt-32/k_tanf.c +++ b/sysdeps/ieee754/flt-32/k_tanf.c @@ -51,11 +51,7 @@ float __kernel_tanf(float x, float y, int iy) if((ix|(iy+1))==0) return one/fabsf(x); else if (iy == 1) { - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x; } else diff --git a/sysdeps/ieee754/flt-32/s_asinhf.c b/sysdeps/ieee754/flt-32/s_asinhf.c index 697faa843c..da9cafb600 100644 --- a/sysdeps/ieee754/flt-32/s_asinhf.c +++ b/sysdeps/ieee754/flt-32/s_asinhf.c @@ -30,11 +30,7 @@ __asinhf(float x) GET_FLOAT_WORD(hx,x); ix = hx&0x7fffffff; if(__builtin_expect(ix< 0x38000000, 0)) { /* |x|<2**-14 */ - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); if(huge+x>one) return x; /* return x inexact except 0 */ } if(__builtin_expect(ix>0x47000000, 0)) { /* |x| > 2**14 */ diff --git a/sysdeps/ieee754/flt-32/s_atanf.c b/sysdeps/ieee754/flt-32/s_atanf.c index be2addbdff..e322a1d41f 100644 --- a/sysdeps/ieee754/flt-32/s_atanf.c +++ b/sysdeps/ieee754/flt-32/s_atanf.c @@ -67,11 +67,7 @@ float __atanf(float x) else return -atanhi[3]-atanlo[3]; } if (ix < 0x3ee00000) { /* |x| < 0.4375 */ if (ix < 0x31000000) { /* |x| < 2^-29 */ - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); if(huge+x>one) return x; /* raise inexact */ } id = -1; diff --git a/sysdeps/ieee754/flt-32/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c index 1aabce5cb8..3162d81d08 100644 --- a/sysdeps/ieee754/flt-32/s_erff.c +++ b/sysdeps/ieee754/flt-32/s_erff.c @@ -113,11 +113,7 @@ float __erff(float x) { /* Avoid spurious underflow. */ float ret = 0.0625f * (16.0f * x + (16.0f * efx) * x); - if (fabsf (ret) < FLT_MIN) - { - float force_underflow = ret * ret; - math_force_eval (force_underflow); - } + math_check_force_underflow (ret); return ret; } return x + efx*x; diff --git a/sysdeps/ieee754/flt-32/s_expm1f.c b/sysdeps/ieee754/flt-32/s_expm1f.c index c81b057f24..c515d25e28 100644 --- a/sysdeps/ieee754/flt-32/s_expm1f.c +++ b/sysdeps/ieee754/flt-32/s_expm1f.c @@ -81,11 +81,7 @@ __expm1f(float x) c = (hi-x)-lo; } else if(hx < 0x33000000) { /* when |x|<2**-25, return x */ - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); t = huge+x; /* return x with inexact flags when x!=0 */ return x - (t-(huge+x)); } diff --git a/sysdeps/ieee754/flt-32/s_log1pf.c b/sysdeps/ieee754/flt-32/s_log1pf.c index 83a09f1414..ade60a2e27 100644 --- a/sysdeps/ieee754/flt-32/s_log1pf.c +++ b/sysdeps/ieee754/flt-32/s_log1pf.c @@ -50,11 +50,7 @@ __log1pf(float x) math_force_eval(two25+x); /* raise inexact */ if (ax<0x24800000) /* |x| < 2**-54 */ { - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x; } else diff --git a/sysdeps/ieee754/flt-32/s_tanhf.c b/sysdeps/ieee754/flt-32/s_tanhf.c index 5b48fb2e00..f70702b29c 100644 --- a/sysdeps/ieee754/flt-32/s_tanhf.c +++ b/sysdeps/ieee754/flt-32/s_tanhf.c @@ -43,11 +43,7 @@ float __tanhf(float x) return x; /* x == +-0 */ if (ix<0x24000000) /* |x|<2**-55 */ { - if (fabsf (x) < FLT_MIN) - { - float force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x*(one+x); /* tanh(small) = small */ } if (ix>=0x3f800000) { /* |x|>=1 */ |