diff src/libm/s_scalbn.c @ 3337:9ac6f0782dd6

Fixed bug #814 Daniele Forghieri 2009-09-30 15:40:53 PDT To compile the source in libm the variable huge must be renamed, I choose huge_val The patch attached change it so it compiles
author Sam Lantinga <slouken@libsdl.org>
date Sun, 04 Oct 2009 09:51:04 +0000
parents dc1eb82ffdaa
children
line wrap: on
line diff
--- a/src/libm/s_scalbn.c	Sun Oct 04 09:18:48 2009 +0000
+++ b/src/libm/s_scalbn.c	Sun Oct 04 09:51:04 2009 +0000
@@ -33,7 +33,7 @@
 #endif
        two54 = 1.80143985094819840000e+16,      /* 0x43500000, 0x00000000 */
          twom54 = 5.55111512312578270212e-17,   /* 0x3C900000, 0x00000000 */
-         huge = 1.0e+300, tiny = 1.0e-300;
+         huge_val = 1.0e+300, tiny = 1.0e-300;
 
 libm_hidden_proto(scalbn)
 #ifdef __STDC__
@@ -60,14 +60,14 @@
         return x + x;           /* NaN or Inf */
     k = k + n;
     if (k > 0x7fe)
-        return huge * copysign(huge, x);        /* overflow  */
+        return huge_val * copysign(huge_val, x);        /* overflow  */
     if (k > 0) {                /* normal result */
         SET_HIGH_WORD(x, (hx & 0x800fffff) | (k << 20));
         return x;
     }
     if (k <= -54) {
         if (n > 50000)          /* in case integer overflow in n+k */
-            return huge * copysign(huge, x);    /*overflow */
+            return huge_val * copysign(huge_val, x);    /*overflow */
         else
             return tiny * copysign(tiny, x);    /*underflow */
     }