diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_asin.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_atanh.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_exp.c | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_exp2.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_gamma_r.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_j1.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_jn.c | 7 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_sinh.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_asinh.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_atan.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_erf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_expm1.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_fma.c | 4 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_log1p.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_sin.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_tan.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_tanh.c | 6 |
17 files changed, 19 insertions, 81 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c index a7684d1..214a612 100644 --- a/sysdeps/ieee754/dbl-64/e_asin.c +++ b/sysdeps/ieee754/dbl-64/e_asin.c @@ -71,11 +71,7 @@ __ieee754_asin(double x){ if (k < 0x3e500000) { - if (fabs (x) < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x; /* for x->0 => sin(x)=x */ } /*----------------------2^-26 <= |x| < 2^ -3 -----------------*/ diff --git a/sysdeps/ieee754/dbl-64/e_atanh.c b/sysdeps/ieee754/dbl-64/e_atanh.c index 6b00b80..f011e4c 100644 --- a/sysdeps/ieee754/dbl-64/e_atanh.c +++ b/sysdeps/ieee754/dbl-64/e_atanh.c @@ -52,11 +52,7 @@ __ieee754_atanh (double x) if (__glibc_unlikely (xa < 0x1.0p-28)) { math_force_eval (huge + x); - if (fabs (x) < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x; } diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c index bb76907..db76268 100644 --- a/sysdeps/ieee754/dbl-64/e_exp.c +++ b/sysdeps/ieee754/dbl-64/e_exp.c @@ -200,10 +200,7 @@ __ieee754_exp (double x) check_uflow_ret: if (retval < DBL_MIN) { -#if FLT_EVAL_METHOD != 0 - volatile -#endif - double force_underflow = tiny * tiny; + double force_underflow = tiny * tiny; math_force_eval (force_underflow); } if (retval == 0) diff --git a/sysdeps/ieee754/dbl-64/e_exp2.c b/sysdeps/ieee754/dbl-64/e_exp2.c index 01df621..48a7254 100644 --- a/sysdeps/ieee754/dbl-64/e_exp2.c +++ b/sysdeps/ieee754/dbl-64/e_exp2.c @@ -122,11 +122,7 @@ __ieee754_exp2 (double x) else { result *= scale_u.d; - if (result < DBL_MIN) - { - double force_underflow = result * result; - math_force_eval (force_underflow); - } + math_check_force_underflow_nonneg (result); return result; } } diff --git a/sysdeps/ieee754/dbl-64/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c index d3fb8af..a09a3fc 100644 --- a/sysdeps/ieee754/dbl-64/e_gamma_r.c +++ b/sysdeps/ieee754/dbl-64/e_gamma_r.c @@ -187,11 +187,7 @@ __ieee754_gamma_r (double x, int *signgamp) double tret = M_PI / (-x * sinpix * gamma_positive (-x, &exp2_adj)); ret = __scalbn (tret, -exp2_adj); - if (ret < DBL_MIN) - { - double 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/dbl-64/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c index 26ffdfe..7f80b3c 100644 --- a/sysdeps/ieee754/dbl-64/e_j1.c +++ b/sysdeps/ieee754/dbl-64/e_j1.c @@ -128,11 +128,7 @@ __ieee754_j1 (double x) if (huge + x > one) /* inexact if x!=0 necessary */ { double ret = 0.5 * x; - if (fabs (ret) < DBL_MIN) - { - double force_underflow = ret * ret; - math_force_eval (force_underflow); - } + math_check_force_underflow (ret); return ret; } } diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c index ccef2dc..d6ab0bc 100644 --- a/sysdeps/ieee754/dbl-64/e_jn.c +++ b/sysdeps/ieee754/dbl-64/e_jn.c @@ -246,11 +246,8 @@ __ieee754_jn (int n, double x) } if (ret == 0) ret = __copysign (DBL_MIN, ret) * DBL_MIN; - else if (fabs (ret) < DBL_MIN) - { - double force_underflow = ret * ret; - math_force_eval (force_underflow); - } + else + math_check_force_underflow (ret); return ret; } strong_alias (__ieee754_jn, __jn_finite) diff --git a/sysdeps/ieee754/dbl-64/e_sinh.c b/sysdeps/ieee754/dbl-64/e_sinh.c index 291bfad..8479bdd 100644 --- a/sysdeps/ieee754/dbl-64/e_sinh.c +++ b/sysdeps/ieee754/dbl-64/e_sinh.c @@ -60,11 +60,7 @@ __ieee754_sinh (double x) if (ix < 0x40360000) /* |x|<22 */ { if (__glibc_unlikely (ix < 0x3e300000)) { /* |x|<2**-28 */ - if (fabs (x) < DBL_MIN) - { - double 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 */ diff --git a/sysdeps/ieee754/dbl-64/s_asinh.c b/sysdeps/ieee754/dbl-64/s_asinh.c index ebe4710..9193301 100644 --- a/sysdeps/ieee754/dbl-64/s_asinh.c +++ b/sysdeps/ieee754/dbl-64/s_asinh.c @@ -39,11 +39,7 @@ __asinh (double x) ix = hx & 0x7fffffff; if (__glibc_unlikely (ix < 0x3e300000)) /* |x|<2**-28 */ { - if (fabs (x) < DBL_MIN) - { - double 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 */ } diff --git a/sysdeps/ieee754/dbl-64/s_atan.c b/sysdeps/ieee754/dbl-64/s_atan.c index 5035ae8..5160cd1 100644 --- a/sysdeps/ieee754/dbl-64/s_atan.c +++ b/sysdeps/ieee754/dbl-64/s_atan.c @@ -90,11 +90,7 @@ atan (double x) { if (u < A) { - if (u < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow_nonneg (u); return x; } else diff --git a/sysdeps/ieee754/dbl-64/s_erf.c b/sysdeps/ieee754/dbl-64/s_erf.c index 77cd50d..e59f5f3 100644 --- a/sysdeps/ieee754/dbl-64/s_erf.c +++ b/sysdeps/ieee754/dbl-64/s_erf.c @@ -213,11 +213,7 @@ __erf (double x) { /* Avoid spurious underflow. */ double ret = 0.0625 * (16.0 * x + (16.0 * efx) * x); - if (fabs (ret) < DBL_MIN) - { - double 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/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c index 41ef63a..54d7710 100644 --- a/sysdeps/ieee754/dbl-64/s_expm1.c +++ b/sysdeps/ieee754/dbl-64/s_expm1.c @@ -195,11 +195,7 @@ __expm1 (double x) } else if (hx < 0x3c900000) /* when |x|<2**-54, return x */ { - if (fabs (x) < DBL_MIN) - { - double 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/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c index 278b690..8b4e133 100644 --- a/sysdeps/ieee754/dbl-64/s_fma.c +++ b/sysdeps/ieee754/dbl-64/s_fma.c @@ -90,8 +90,8 @@ __fma (double x, double y, double z) && w.ieee.mantissa1 == 0 && w.ieee.mantissa0 == 0))) { - volatile double force_underflow = x * y; - (void) force_underflow; + double force_underflow = x * y; + math_force_eval (force_underflow); } return v.d * 0x1p-54; } diff --git a/sysdeps/ieee754/dbl-64/s_log1p.c b/sysdeps/ieee754/dbl-64/s_log1p.c index cff555b..340f637 100644 --- a/sysdeps/ieee754/dbl-64/s_log1p.c +++ b/sysdeps/ieee754/dbl-64/s_log1p.c @@ -120,11 +120,7 @@ __log1p (double x) math_force_eval (two54 + x); /* raise inexact */ if (ax < 0x3c900000) /* |x| < 2**-54 */ { - if (fabs (x) < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x; } else diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c index eff120e..48c924c 100644 --- a/sysdeps/ieee754/dbl-64/s_sin.c +++ b/sysdeps/ieee754/dbl-64/s_sin.c @@ -297,11 +297,7 @@ __sin (double x) k = 0x7fffffff & m; /* no sign */ if (k < 0x3e500000) /* if x->0 =>sin(x)=x */ { - if (fabs (x) < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); retval = x; } /*---------------------------- 2^-26 < |x|< 0.25 ----------------------*/ diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c index b4e3bd2..65d056a 100644 --- a/sysdeps/ieee754/dbl-64/s_tan.c +++ b/sysdeps/ieee754/dbl-64/s_tan.c @@ -92,11 +92,7 @@ tan (double x) /* (I) The case abs(x) <= 1.259e-8 */ if (w <= g1.d) { - if (w < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow_nonneg (w); retval = x; goto ret; } diff --git a/sysdeps/ieee754/dbl-64/s_tanh.c b/sysdeps/ieee754/dbl-64/s_tanh.c index 4f9fcfd..344a2f0 100644 --- a/sysdeps/ieee754/dbl-64/s_tanh.c +++ b/sysdeps/ieee754/dbl-64/s_tanh.c @@ -70,11 +70,7 @@ __tanh (double x) return x; /* x == +-0 */ if (ix < 0x3c800000) /* |x|<2**-55 */ { - if (fabs (x) < DBL_MIN) - { - double force_underflow = x * x; - math_force_eval (force_underflow); - } + math_check_force_underflow (x); return x * (one + x); /* tanh(small) = small */ } if (ix >= 0x3ff00000) /* |x|>=1 */ |