diff options
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_gammaf_r.c')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_gammaf_r.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c index 250e412aa7..183db1e033 100644 --- a/sysdeps/ieee754/flt-32/e_gammaf_r.c +++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c @@ -69,11 +69,7 @@ gammaf_positive (float x, int *exp2_adj) /* Adjust into the range for applying Stirling's approximation. */ float n = __ceilf (4.0f - x); -#if FLT_EVAL_METHOD != 0 - volatile -#endif - float x_tmp = x + n; - x_adj = x_tmp; + x_adj = math_narrow_eval (x + n); x_eps = (x - (x_adj - n)); prod = __gamma_productf (x_adj - n, x_eps, n, &eps); } @@ -111,9 +107,6 @@ float __ieee754_gammaf_r (float x, int *signgamp) { int32_t hx; -#if FLT_EVAL_METHOD != 0 - volatile -#endif float ret; GET_FLOAT_WORD (hx, x); @@ -149,7 +142,7 @@ __ieee754_gammaf_r (float x, int *signgamp) { /* Overflow. */ *signgamp = 0; - ret = FLT_MAX * FLT_MAX; + ret = math_narrow_eval (FLT_MAX * FLT_MAX); return ret; } else @@ -193,27 +186,28 @@ __ieee754_gammaf_r (float x, int *signgamp) } } } + ret = math_narrow_eval (ret); } if (isinf (ret) && x != 0) { if (*signgamp < 0) { - ret = -__copysignf (FLT_MAX, ret) * FLT_MAX; + ret = math_narrow_eval (-__copysignf (FLT_MAX, ret) * FLT_MAX); ret = -ret; } else - ret = __copysignf (FLT_MAX, ret) * FLT_MAX; + ret = math_narrow_eval (__copysignf (FLT_MAX, ret) * FLT_MAX); return ret; } else if (ret == 0) { if (*signgamp < 0) { - ret = -__copysignf (FLT_MIN, ret) * FLT_MIN; + ret = math_narrow_eval (-__copysignf (FLT_MIN, ret) * FLT_MIN); ret = -ret; } else - ret = __copysignf (FLT_MIN, ret) * FLT_MIN; + ret = math_narrow_eval (__copysignf (FLT_MIN, ret) * FLT_MIN); return ret; } else |