about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r--sysdeps/ieee754/flt-32/e_gammaf_r.c20
-rw-r--r--sysdeps/ieee754/flt-32/k_rem_pio2f.c19
-rw-r--r--sysdeps/ieee754/flt-32/lgamma_negf.c12
-rw-r--r--sysdeps/ieee754/flt-32/s_erff.c5
-rw-r--r--sysdeps/ieee754/flt-32/s_llrintf.c4
-rw-r--r--sysdeps/ieee754/flt-32/s_lrintf.c4
6 files changed, 19 insertions, 45 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
diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c
index 6f14d5bac7..0c7685c3ab 100644
--- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c
+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c
@@ -167,30 +167,21 @@ recompute:
 		break;
 	    case 1:
 	    case 2:;
-#if __FLT_EVAL_METHOD__ != 0
-		volatile
-#endif
 		float fv = 0.0;
-		for (i=jz;i>=0;i--) fv += fq[i];
+		for (i=jz;i>=0;i--) fv = math_narrow_eval (fv + fq[i]);
 		y[0] = (ih==0)? fv: -fv;
-		fv = fq[0]-fv;
-		for (i=1;i<=jz;i++) fv += fq[i];
+		fv = math_narrow_eval (fq[0]-fv);
+		for (i=1;i<=jz;i++) fv = math_narrow_eval (fv + fq[i]);
 		y[1] = (ih==0)? fv: -fv;
 		break;
 	    case 3:	/* painful */
 		for (i=jz;i>0;i--) {
-#if __FLT_EVAL_METHOD__ != 0
-		    volatile
-#endif
-		    float fv = fq[i-1]+fq[i];
+		    float fv = math_narrow_eval (fq[i-1]+fq[i]);
 		    fq[i]  += fq[i-1]-fv;
 		    fq[i-1] = fv;
 		}
 		for (i=jz;i>1;i--) {
-#if __FLT_EVAL_METHOD__ != 0
-		    volatile
-#endif
-		    float fv = fq[i-1]+fq[i];
+		    float fv = math_narrow_eval (fq[i-1]+fq[i]);
 		    fq[i]  += fq[i-1]-fv;
 		    fq[i-1] = fv;
 		}
diff --git a/sysdeps/ieee754/flt-32/lgamma_negf.c b/sysdeps/ieee754/flt-32/lgamma_negf.c
index ed9659801e..68bee8572a 100644
--- a/sysdeps/ieee754/flt-32/lgamma_negf.c
+++ b/sysdeps/ieee754/flt-32/lgamma_negf.c
@@ -245,17 +245,9 @@ __lgamma_negf (float x, int *signgamp)
     }
 
   float log_gamma_ratio;
-#if FLT_EVAL_METHOD != 0
-  volatile
-#endif
-  float y0_tmp = 1 - x0_hi;
-  float y0 = y0_tmp;
+  float y0 = math_narrow_eval (1 - x0_hi);
   float y0_eps = -x0_hi + (1 - y0) - x0_lo;
-#if FLT_EVAL_METHOD != 0
-  volatile
-#endif
-  float y_tmp = 1 - x;
-  float y = y_tmp;
+  float y = math_narrow_eval (1 - x);
   float y_eps = -x + (1 - y);
   /* We now wish to compute LOG_GAMMA_RATIO
      = log (gamma (Y0 + Y0_EPS) / gamma (Y + Y_EPS)).  XDIFF
diff --git a/sysdeps/ieee754/flt-32/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c
index 2be44cc40c..1aabce5cb8 100644
--- a/sysdeps/ieee754/flt-32/s_erff.c
+++ b/sysdeps/ieee754/flt-32/s_erff.c
@@ -213,10 +213,7 @@ float __erfcf(float x)
 	    r  =  __ieee754_expf(-z*z-(float)0.5625)*
 			__ieee754_expf((z-x)*(z+x)+R/S);
 	    if(hx>0) {
-#if FLT_EVAL_METHOD != 0
-		volatile
-#endif
-		float ret = r/x;
+		float ret = math_narrow_eval (r/x);
 		if (ret == 0)
 		    __set_errno (ERANGE);
 		return ret;
diff --git a/sysdeps/ieee754/flt-32/s_llrintf.c b/sysdeps/ieee754/flt-32/s_llrintf.c
index ac8c1a2216..d7588d04cf 100644
--- a/sysdeps/ieee754/flt-32/s_llrintf.c
+++ b/sysdeps/ieee754/flt-32/s_llrintf.c
@@ -34,7 +34,7 @@ __llrintf (float x)
 {
   int32_t j0;
   u_int32_t i0;
-  volatile float w;
+  float w;
   float t;
   long long int result;
   int sx;
@@ -52,7 +52,7 @@ __llrintf (float x)
 	result = (long long int) i0 << (j0 - 23);
       else
 	{
-	  w = two23[sx] + x;
+	  w = math_narrow_eval (two23[sx] + x);
 	  t = w - two23[sx];
 	  GET_FLOAT_WORD (i0, t);
 	  j0 = ((i0 >> 23) & 0xff) - 0x7f;
diff --git a/sysdeps/ieee754/flt-32/s_lrintf.c b/sysdeps/ieee754/flt-32/s_lrintf.c
index 7581a8d286..bc60fd2311 100644
--- a/sysdeps/ieee754/flt-32/s_lrintf.c
+++ b/sysdeps/ieee754/flt-32/s_lrintf.c
@@ -34,7 +34,7 @@ __lrintf (float x)
 {
   int32_t j0;
   u_int32_t i0;
-  volatile float w;
+  float w;
   float t;
   long int result;
   int sx;
@@ -52,7 +52,7 @@ __lrintf (float x)
 	result = (long int) i0 << (j0 - 23);
       else
 	{
-	  w = two23[sx] + x;
+	  w = math_narrow_eval (two23[sx] + x);
 	  t = w - two23[sx];
 	  GET_FLOAT_WORD (i0, t);
 	  j0 = ((i0 >> 23) & 0xff) - 0x7f;