diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-08-01 10:55:33 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-08-01 10:55:33 +0200 |
commit | 57044b5af1c270378dd02087bb48c48cd6786d6e (patch) | |
tree | 9f625e77a1aff1b0365afde48f24cdfe2e28ccf7 /libquadmath | |
parent | 8586635cd8c75f3aa096e64953d08f0dfbe6d4f6 (diff) | |
download | gcc-57044b5af1c270378dd02087bb48c48cd6786d6e.zip gcc-57044b5af1c270378dd02087bb48c48cd6786d6e.tar.gz gcc-57044b5af1c270378dd02087bb48c48cd6786d6e.tar.bz2 |
rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y conversion for prec 3 and __FLT_EVAL_METHOD__ != 0.
* math/rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y
conversion for prec 3 and __FLT_EVAL_METHOD__ != 0.
From-SVN: r176999
Diffstat (limited to 'libquadmath')
-rw-r--r-- | libquadmath/ChangeLog | 5 | ||||
-rw-r--r-- | libquadmath/math/rem_pio2q.c | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index 522d683..7b35cc9 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,8 @@ +2011-08-01 Jakub Jelinek <jakub@redhat.com> + + * math/rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y + conversion for prec 3 and __FLT_EVAL_METHOD__ != 0. + 2011-04-03 Tobias Burnus <burnus@net-b.de> PR fortran/48311 diff --git a/libquadmath/math/rem_pio2q.c b/libquadmath/math/rem_pio2q.c index a1c0b83..47ee8ef 100644 --- a/libquadmath/math/rem_pio2q.c +++ b/libquadmath/math/rem_pio2q.c @@ -282,14 +282,20 @@ recompute: break; case 3: /* painful */ for (i=jz;i>0;i--) { - fw = fq[i-1]+fq[i]; - fq[i] += fq[i-1]-fw; - fq[i-1] = fw; +#if __FLT_EVAL_METHOD__ != 0 + volatile +#endif + double fv = (double)(fq[i-1]+fq[i]); + fq[i] += fq[i-1]-fv; + fq[i-1] = fv; } for (i=jz;i>1;i--) { - fw = fq[i-1]+fq[i]; - fq[i] += fq[i-1]-fw; - fq[i-1] = fw; +#if __FLT_EVAL_METHOD__ != 0 + volatile +#endif + double fv = (double)(fq[i-1]+fq[i]); + fq[i] += fq[i-1]-fv; + fq[i-1] = fv; } for (fw=0.0,i=jz;i>=2;i--) fw += fq[i]; if(ih==0) { |