diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-03-19 22:07:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-03-19 22:07:43 -0400 |
commit | 97721a5508415a2f10eb068e022093811c9ff8be (patch) | |
tree | 88e9ce153895ad949576fa7ce1eeee4b02286479 /src/math/expl.c | |
parent | acb744921b73f5a73803e533e5e4a4896d164a26 (diff) | |
parent | 0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff) | |
download | musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.bz2 musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.xz musl-97721a5508415a2f10eb068e022093811c9ff8be.zip |
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/expl.c')
-rw-r--r-- | src/math/expl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/expl.c b/src/math/expl.c index 9507fd2e..b289ffec 100644 --- a/src/math/expl.c +++ b/src/math/expl.c @@ -102,13 +102,13 @@ long double expl(long double x) if (x > MAXLOGL) return INFINITY; if (x < MINLOGL) - return 0.0L; + return 0.0; /* Express e**x = e**g 2**n * = e**g e**(n loge(2)) * = e**(g + n loge(2)) */ - px = floorl(LOG2EL * x + 0.5L); /* floor() truncates toward -infinity. */ + px = floorl(LOG2EL * x + 0.5); /* floor() truncates toward -infinity. */ n = px; x -= px * C1; x -= px * C2; @@ -120,8 +120,8 @@ long double expl(long double x) xx = x * x; px = x * __polevll(xx, P, 2); x = px/(__polevll(xx, Q, 3) - px); - x = 1.0L + ldexpl(x, 1); - x = ldexpl(x, n); + x = 1.0 + 2.0 * x; + x = scalbnl(x, n); return x; } #endif |