diff options
-rw-r--r-- | libquadmath/ChangeLog | 7 | ||||
-rw-r--r-- | libquadmath/math/cbrtq.c | 16 | ||||
-rw-r--r-- | libquadmath/math/fmaq.c | 12 | ||||
-rw-r--r-- | libquadmath/math/rintq.c | 4 |
4 files changed, 23 insertions, 16 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index 867ab48b989..213233abae6 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -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 diff --git a/libquadmath/math/cbrtq.c b/libquadmath/math/cbrtq.c index f1f05cac789..2567d4d5bd3 100644 --- a/libquadmath/math/cbrtq.c +++ b/libquadmath/math/cbrtq.c @@ -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; diff --git a/libquadmath/math/fmaq.c b/libquadmath/math/fmaq.c index fa3b3eafc05..d3c5fb3901a 100644 --- a/libquadmath/math/fmaq.c +++ b/libquadmath/math/fmaq.c @@ -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; diff --git a/libquadmath/math/rintq.c b/libquadmath/math/rintq.c index 4a50503721c..15d4c781ba4 100644 --- a/libquadmath/math/rintq.c +++ b/libquadmath/math/rintq.c @@ -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 |