Fix uses of math_force_eval
authorAndreas Schwab <schwab@redhat.com>
Wed, 26 Oct 2011 09:37:08 +0000 (11:37 +0200)
committerAndreas Schwab <schwab@redhat.com>
Wed, 26 Oct 2011 09:44:08 +0000 (11:44 +0200)
ChangeLog
sysdeps/ieee754/dbl-64/s_round.c
sysdeps/ieee754/flt-32/e_j0f.c
sysdeps/ieee754/flt-32/s_roundf.c

index 68f7766..57c4bbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-10-26  Andreas Schwab  <schwab@redhat.com>
 
+       * sysdeps/ieee754/flt-32/e_j0f.c: Fix use of math_force_eval.
+       * sysdeps/ieee754/dbl-64/s_round.c: Likewise.
+       * sysdeps/ieee754/flt-32/s_roundf.c: Likewise.
+
        * math/math_private.h (math_force_eval): Allow non-addressable
        arguments.
        * sysdeps/i386/fpu/math_private.h (math_force_eval): Likewise.
index f8a3816..7446196 100644 (file)
@@ -38,7 +38,7 @@ __round (double x)
     {
       if (j0 < 0)
        {
-         math_force_eval (huge + x > 0.0);
+         math_force_eval (huge + x);
 
          i0 &= 0x80000000;
          if (j0 == -1)
@@ -51,7 +51,7 @@ __round (double x)
          if (((i0 & i) | i1) == 0)
            /* X is integral.  */
            return x;
-         math_force_eval (huge + x > 0.0);
+         math_force_eval (huge + x);
 
          /* Raise inexact if x != 0.  */
          i0 += 0x00080000 >> j0;
@@ -74,7 +74,7 @@ __round (double x)
        /* X is integral.  */
        return x;
 
-      math_force_eval (huge + x > 0.0);
+      math_force_eval (huge + x);
 
       /* Raise inexact if x != 0.  */
       u_int32_t j = i1 + (1 << (51 - j0));
index 181c2e4..0cc52c9 100644 (file)
@@ -66,7 +66,7 @@ __ieee754_j0f(float x)
                return z;
        }
        if(ix<0x39000000) {     /* |x| < 2**-13 */
-           math_force_eval(huge+x>one);        /* raise inexact if x != 0 */
+           math_force_eval(huge+x);            /* raise inexact if x != 0 */
            if(ix<0x32000000) return one;       /* |x|<2**-27 */
            else              return one - (float)0.25*x*x;
        }
index 09b38cd..f4f9dd6 100644 (file)
@@ -37,7 +37,7 @@ __roundf (float x)
     {
       if (j0 < 0)
        {
-         math_force_eval (huge + x > 0.0F);
+         math_force_eval (huge + x);
 
          i0 &= 0x80000000;
          if (j0 == -1)
@@ -49,7 +49,7 @@ __roundf (float x)
          if ((i0 & i) == 0)
            /* X is integral.  */
            return x;
-         math_force_eval (huge + x > 0.0F);
+         math_force_eval (huge + x);
 
          /* Raise inexact if x != 0.  */
          i0 += 0x00400000 >> j0;