]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cbrtq.c (cbrtq): Use Q suffixed floating point constants instead of L suffixed ones.
authorJakub Jelinek <jakub@redhat.com>
Thu, 13 Dec 2012 12:35:56 +0000 (13:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 13 Dec 2012 12:35:56 +0000 (13:35 +0100)
* math/cbrtq.c (cbrtq): Use Q suffixed floating point constants
instead of L suffixed ones.
* math/fmaq.c (fmaq): Likewise.
* math/rintq.c (TWO112): Likewise.

From-SVN: r194475

libquadmath/ChangeLog
libquadmath/math/cbrtq.c
libquadmath/math/fmaq.c
libquadmath/math/rintq.c

index 867ab48b989a3d243e884a4573abac37f8970499..213233abae6fadbed0e1c4a56f728d1aba3c66cd 100644 (file)
@@ -1,3 +1,10 @@
+2012-12-13  Jakub Jelinek  <jakub@redhat.com>
+
+       * math/cbrtq.c (cbrtq): Use Q suffixed floating point constants
+       instead of L suffixed ones.
+       * math/fmaq.c (fmaq): Likewise.
+       * math/rintq.c (TWO112): Likewise.
+
 2012-12-03  Tobias Burnus  <burnus@net-b.de>
 
        * strtod/strtod_l.c (___STRTOF_INTERNAL): Fix exponent
index f1f05cac78900b8413579e4bd175f0356d4141a8..2567d4d5bd3985799be80e6bbd1f947c1b1479c7 100644 (file)
@@ -88,11 +88,11 @@ cbrtq ( __float128 x)
 
   /* Approximate cube root of number between .5 and 1,
      peak relative error = 1.2e-6  */
-  x = ((((1.3584464340920900529734e-1L * x
-         - 6.3986917220457538402318e-1L) * x
-        + 1.2875551670318751538055e0L) * x
-       - 1.4897083391357284957891e0L) * x
-       + 1.3304961236013647092521e0L) * x + 3.7568280825958912391243e-1L;
+  x = ((((1.3584464340920900529734e-1Q * x
+         - 6.3986917220457538402318e-1Q) * x
+        + 1.2875551670318751538055e0Q) * x
+       - 1.4897083391357284957891e0Q) * x
+       + 1.3304961236013647092521e0Q) * x + 3.7568280825958912391243e-1Q;
 
   /* exponent divided by 3 */
   if (e >= 0)
@@ -122,9 +122,9 @@ cbrtq ( __float128 x)
   x = ldexpq (x, e);
 
   /* Newton iteration */
-  x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
-  x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
-  x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
+  x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333Q;
+  x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333Q;
+  x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333Q;
 
   if (sign < 0)
     x = -x;
index fa3b3eafc0513c519b17fd7ed20909b213201073..d3c5fb3901a8ea743cb9f458cceb1e08b563beee 100644 (file)
@@ -80,7 +80,7 @@ fmaq (__float128 x, __float128 y, __float128 z)
          < IEEE854_FLOAT128_BIAS - FLT128_MANT_DIG - 2)
        {
          int neg = u.ieee.negative ^ v.ieee.negative;
-         __float128 tiny = neg ? -0x1p-16494L : 0x1p-16494L;
+         __float128 tiny = neg ? -0x1p-16494Q : 0x1p-16494Q;
          if (w.ieee.exponent >= 3)
            return tiny + z;
          /* Scaling up, adding TINY and scaling down produces the
@@ -88,7 +88,7 @@ fmaq (__float128 x, __float128 y, __float128 z)
             TINY has no effect and in other modes double rounding is
             harmless.  But it may not produce required underflow
             exceptions.  */
-         v.value = z * 0x1p114L + tiny;
+         v.value = z * 0x1p114Q + tiny;
          if (TININESS_AFTER_ROUNDING
              ? v.ieee.exponent < 115
              : (w.ieee.exponent == 0
@@ -100,7 +100,7 @@ fmaq (__float128 x, __float128 y, __float128 z)
              volatile __float128 force_underflow = x * y;
              (void) force_underflow;
            }
-         return v.value * 0x1p-114L;
+         return v.value * 0x1p-114Q;
        }
       if (u.ieee.exponent + v.ieee.exponent
          >= 0x7fff + IEEE854_FLOAT128_BIAS - FLT128_MANT_DIG)
@@ -296,7 +296,7 @@ fmaq (__float128 x, __float128 y, __float128 z)
            {
              w.value = a1 + u.value;
              if (w.ieee.exponent == 227)
-               return w.value * 0x1p-226L;
+               return w.value * 0x1p-226Q;
            }
          /* v.ieee.mant_low & 2 is LSB bit of the result before rounding,
             v.ieee.mant_low & 1 is the round bit and j is our sticky
@@ -305,8 +305,8 @@ fmaq (__float128 x, __float128 y, __float128 z)
          w.ieee.mant_low = ((v.ieee.mant_low & 3) << 1) | j;
          w.ieee.negative = v.ieee.negative;
          v.ieee.mant_low &= ~3U;
-         v.value *= 0x1p-226L;
-         w.value *= 0x1p-2L;
+         v.value *= 0x1p-226Q;
+         w.value *= 0x1p-2Q;
          return v.value + w.value;
        }
       v.ieee.mant_low |= j;
index 4a50503721c4711cf174b4350d2c9013ed1d5326..15d4c781ba485b1fe66e912f1da2f627966b359b 100644 (file)
@@ -27,8 +27,8 @@
 
 static const __float128
 TWO112[2]={
-  5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
- -5.19229685853482762853049632922009600E+33L  /* 0xC06F000000000000, 0 */
+  5.19229685853482762853049632922009600E+33Q, /* 0x406F000000000000, 0 */
+ -5.19229685853482762853049632922009600E+33Q  /* 0xC06F000000000000, 0 */
 };
 
 __float128