+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
/* 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)
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;
< 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
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
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)
{
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
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;
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