diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_gamma_r.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_gamma_r.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c index d1acaa6a12..d3fb8af97e 100644 --- a/sysdeps/ieee754/dbl-64/e_gamma_r.c +++ b/sysdeps/ieee754/dbl-64/e_gamma_r.c @@ -76,11 +76,7 @@ gamma_positive (double x, int *exp2_adj) /* Adjust into the range for applying Stirling's approximation. */ double n = __ceil (12.0 - x); -#if FLT_EVAL_METHOD != 0 - volatile -#endif - double x_tmp = x + n; - x_adj = x_tmp; + x_adj = math_narrow_eval (x + n); x_eps = (x - (x_adj - n)); prod = __gamma_product (x_adj - n, x_eps, n, &eps); } @@ -119,9 +115,6 @@ __ieee754_gamma_r (double x, int *signgamp) { int32_t hx; u_int32_t lx; -#if FLT_EVAL_METHOD != 0 - volatile -#endif double ret; EXTRACT_WORDS (hx, lx, x); @@ -157,7 +150,7 @@ __ieee754_gamma_r (double x, int *signgamp) { /* Overflow. */ *signgamp = 0; - ret = DBL_MAX * DBL_MAX; + ret = math_narrow_eval (DBL_MAX * DBL_MAX); return ret; } else @@ -201,27 +194,28 @@ __ieee754_gamma_r (double x, int *signgamp) } } } + ret = math_narrow_eval (ret); } if (isinf (ret) && x != 0) { if (*signgamp < 0) { - ret = -__copysign (DBL_MAX, ret) * DBL_MAX; + ret = math_narrow_eval (-__copysign (DBL_MAX, ret) * DBL_MAX); ret = -ret; } else - ret = __copysign (DBL_MAX, ret) * DBL_MAX; + ret = math_narrow_eval (__copysign (DBL_MAX, ret) * DBL_MAX); return ret; } else if (ret == 0) { if (*signgamp < 0) { - ret = -__copysign (DBL_MIN, ret) * DBL_MIN; + ret = math_narrow_eval (-__copysign (DBL_MIN, ret) * DBL_MIN); ret = -ret; } else - ret = __copysign (DBL_MIN, ret) * DBL_MIN; + ret = math_narrow_eval (__copysign (DBL_MIN, ret) * DBL_MIN); return ret; } else |