Sync upstream FreeBSD libm.
Test: treehugger
Change-Id: I583a3e93821d512c975db34fc1610ffd22445d58
diff --git a/libm/upstream-freebsd/lib/msun/ld128/s_expl.c b/libm/upstream-freebsd/lib/msun/ld128/s_expl.c
index 5fc4380..0274a8f 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/s_expl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/s_expl.c
@@ -65,8 +65,6 @@
int k;
uint16_t hx, ix;
- DOPRINT_START(&x);
-
/* Filter out exceptional cases. */
u.e = x;
hx = u.xbits.expsign;
@@ -74,15 +72,15 @@
if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */
if (ix == BIAS + LDBL_MAX_EXP) {
if (hx & 0x8000) /* x is -Inf or -NaN */
- RETURNP(-1 / x);
- RETURNP(x + x); /* x is +Inf or +NaN */
+ RETURNF(-1 / x);
+ RETURNF(x + x); /* x is +Inf or +NaN */
}
if (x > o_threshold)
- RETURNP(huge * huge);
+ RETURNF(huge * huge);
if (x < u_threshold)
- RETURNP(tiny * tiny);
+ RETURNF(tiny * tiny);
} else if (ix < BIAS - 114) { /* |x| < 0x1p-114 */
- RETURN2P(1, x); /* 1 with inexact iff x != 0 */
+ RETURNF(1 + x); /* 1 with inexact iff x != 0 */
}
ENTERI();
@@ -210,8 +208,6 @@
int k, n, n2;
uint16_t hx, ix;
- DOPRINT_START(&x);
-
/* Filter out exceptional cases. */
u.e = x;
hx = u.xbits.expsign;
@@ -219,11 +215,11 @@
if (ix >= BIAS + 7) { /* |x| >= 128 or x is NaN */
if (ix == BIAS + LDBL_MAX_EXP) {
if (hx & 0x8000) /* x is -Inf or -NaN */
- RETURNP(-1 / x - 1);
- RETURNP(x + x); /* x is +Inf or +NaN */
+ RETURNF(-1 / x - 1);
+ RETURNF(x + x); /* x is +Inf or +NaN */
}
if (x > o_threshold)
- RETURNP(huge * huge);
+ RETURNF(huge * huge);
/*
* expm1l() never underflows, but it must avoid
* unrepresentable large negative exponents. We used a
@@ -232,7 +228,7 @@
* in the same way as large ones here.
*/
if (hx & 0x8000) /* x <= -128 */
- RETURN2P(tiny, -1); /* good for x < -114ln2 - eps */
+ RETURNF(tiny - 1); /* good for x < -114ln2 - eps */
}
ENTERI();
@@ -244,7 +240,7 @@
if (x < T3) {
if (ix < BIAS - 113) { /* |x| < 0x1p-113 */
/* x (rounded) with inexact if x != 0: */
- RETURNPI(x == 0 ? x :
+ RETURNI(x == 0 ? x :
(0x1p200 * x + fabsl(x)) * 0x1p-200);
}
q = x * x2 * C3 + x2 * x2 * (C4 + x * (C5 + x * (C6 +
@@ -265,9 +261,9 @@
hx2_hi = x_hi * x_hi / 2;
hx2_lo = x_lo * (x + x_hi) / 2;
if (ix >= BIAS - 7)
- RETURN2PI(hx2_hi + x_hi, hx2_lo + x_lo + q);
+ RETURNI((hx2_hi + x_hi) + (hx2_lo + x_lo + q));
else
- RETURN2PI(x, hx2_lo + q + hx2_hi);
+ RETURNI(x + (hx2_lo + q + hx2_hi));
}
/* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */