src/libm/s_floor.c
changeset 3337 9ac6f0782dd6
parent 3162 dc1eb82ffdaa
child 6044 35448a5ea044
     1.1 --- a/src/libm/s_floor.c	Sun Oct 04 09:18:48 2009 +0000
     1.2 +++ b/src/libm/s_floor.c	Sun Oct 04 09:51:04 2009 +0000
     1.3 @@ -28,9 +28,9 @@
     1.4  #include "math_private.h"
     1.5  
     1.6  #ifdef __STDC__
     1.7 -static const double huge = 1.0e300;
     1.8 +static const double huge_val = 1.0e300;
     1.9  #else
    1.10 -static double huge = 1.0e300;
    1.11 +static double huge_val = 1.0e300;
    1.12  #endif
    1.13  
    1.14  libm_hidden_proto(floor)
    1.15 @@ -47,7 +47,7 @@
    1.16      j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
    1.17      if (j0 < 20) {
    1.18          if (j0 < 0) {           /* raise inexact if x != 0 */
    1.19 -            if (huge + x > 0.0) {       /* return 0*sign(x) if |x|<1 */
    1.20 +            if (huge_val + x > 0.0) {       /* return 0*sign(x) if |x|<1 */
    1.21                  if (i0 >= 0) {
    1.22                      i0 = i1 = 0;
    1.23                  } else if (((i0 & 0x7fffffff) | i1) != 0) {
    1.24 @@ -59,7 +59,7 @@
    1.25              i = (0x000fffff) >> j0;
    1.26              if (((i0 & i) | i1) == 0)
    1.27                  return x;       /* x is integral */
    1.28 -            if (huge + x > 0.0) {       /* raise inexact flag */
    1.29 +            if (huge_val + x > 0.0) {       /* raise inexact flag */
    1.30                  if (i0 < 0)
    1.31                      i0 += (0x00100000) >> j0;
    1.32                  i0 &= (~i);
    1.33 @@ -75,7 +75,7 @@
    1.34          i = ((u_int32_t) (0xffffffff)) >> (j0 - 20);
    1.35          if ((i1 & i) == 0)
    1.36              return x;           /* x is integral */
    1.37 -        if (huge + x > 0.0) {   /* raise inexact flag */
    1.38 +        if (huge_val + x > 0.0) {   /* raise inexact flag */
    1.39              if (i0 < 0) {
    1.40                  if (j0 == 20)
    1.41                      i0 += 1;