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/__rem_pio2_large.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/__rem_pio2_large.c')
-rw-r--r-- | src/math/__rem_pio2_large.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/math/__rem_pio2_large.c b/src/math/__rem_pio2_large.c index 35835f83..27b619cc 100644 --- a/src/math/__rem_pio2_large.c +++ b/src/math/__rem_pio2_large.c @@ -271,8 +271,6 @@ static const double PIo2[] = { }; static const double -zero = 0.0, -one = 1.0, two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */ @@ -293,7 +291,7 @@ int __rem_pio2_large(double *x, double *y, int e0, int nx, int prec) /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */ j = jv-jx; m = jx+jk; for (i=0; i<=m; i++,j++) - f[i] = j<0 ? zero : (double)ipio2[j]; + f[i] = j<0 ? 0.0 : (double)ipio2[j]; /* compute q[0],q[1],...q[jk] */ for (i=0; i<=jk; i++) { @@ -346,14 +344,14 @@ recompute: } } if (ih == 2) { - z = one - z; + z = 1.0 - z; if (carry != 0) - z -= scalbn(one,q0); + z -= scalbn(1.0,q0); } } /* check if recomputation is needed */ - if (z == zero) { + if (z == 0.0) { j = 0; for (i=jz-1; i>=jk; i--) j |= iq[i]; if (j == 0) { /* need recomputation */ @@ -391,7 +389,7 @@ recompute: } /* convert integer "bit" chunk to floating-point value */ - fw = scalbn(one,q0); + fw = scalbn(1.0,q0); for (i=jz; i>=0; i--) { q[i] = fw*(double)iq[i]; fw *= twon24; |