diff --git a/ChangeLog b/ChangeLog index 1cf7e22581..fbacbd5699 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-01 Jakub Jelinek + + * sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2): Fix up fq + to y conversion for prec 3 and __FLT_EVAL_METHOD__ != 0. + 2011-07-22 Liubov Dmitrieva * sysdeps/i386/i686/multiarch/strcat-sse2.S: Update. diff --git a/sysdeps/ieee754/dbl-64/k_rem_pio2.c b/sysdeps/ieee754/dbl-64/k_rem_pio2.c index ccf1633bd4..911ff1fe35 100644 --- a/sysdeps/ieee754/dbl-64/k_rem_pio2.c +++ b/sysdeps/ieee754/dbl-64/k_rem_pio2.c @@ -300,14 +300,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) {