summaryrefslogtreecommitdiff
path: root/src/math/fmal.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
commit97721a5508415a2f10eb068e022093811c9ff8be (patch)
tree88e9ce153895ad949576fa7ce1eeee4b02286479 /src/math/fmal.c
parentacb744921b73f5a73803e533e5e4a4896d164a26 (diff)
parent0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff)
downloadmusl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/fmal.c')
-rw-r--r--src/math/fmal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/math/fmal.c b/src/math/fmal.c
index cbaf46eb..be64f145 100644
--- a/src/math/fmal.c
+++ b/src/math/fmal.c
@@ -115,7 +115,7 @@ static inline long double add_and_denormalize(long double a, long double b, int
if (bits_lost != 1 ^ (int)(u.bits.manl & 1))
sum.hi = nextafterl(sum.hi, INFINITY * sum.lo);
}
- return (ldexp(sum.hi, scale));
+ return scalbnl(sum.hi, scale);
}
/*
@@ -228,7 +228,7 @@ long double fmal(long double x, long double y, long double z)
}
}
if (spread <= LDBL_MANT_DIG * 2)
- zs = ldexpl(zs, -spread);
+ zs = scalbnl(zs, -spread);
else
zs = copysignl(LDBL_MIN, zs);
@@ -254,7 +254,7 @@ long double fmal(long double x, long double y, long double z)
*/
fesetround(oround);
volatile long double vzs = zs; /* XXX gcc CSE bug workaround */
- return (xy.hi + vzs + ldexpl(xy.lo, spread));
+ return xy.hi + vzs + scalbnl(xy.lo, spread);
}
if (oround != FE_TONEAREST) {
@@ -264,13 +264,13 @@ long double fmal(long double x, long double y, long double z)
*/
fesetround(oround);
adj = r.lo + xy.lo;
- return (ldexpl(r.hi + adj, spread));
+ return scalbnl(r.hi + adj, spread);
}
adj = add_adjusted(r.lo, xy.lo);
if (spread + ilogbl(r.hi) > -16383)
- return (ldexpl(r.hi + adj, spread));
+ return scalbnl(r.hi + adj, spread);
else
- return (add_and_denormalize(r.hi, adj, spread));
+ return add_and_denormalize(r.hi, adj, spread);
}
#endif