diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-03-16 12:28:25 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-03-16 12:30:05 +0000 |
commit | 8848d99dce1e57168a492d146f5e72195c7665a5 (patch) | |
tree | b08411393dc81052bb86482bbdb044b622b57653 /sysdeps/ieee754/dbl-64/k_rem_pio2.c | |
parent | dd7f470327139a88019b2c5ded8fc2811b0fed00 (diff) | |
download | glibc-8848d99dce1e57168a492d146f5e72195c7665a5.tar glibc-8848d99dce1e57168a492d146f5e72195c7665a5.tar.gz glibc-8848d99dce1e57168a492d146f5e72195c7665a5.tar.bz2 glibc-8848d99dce1e57168a492d146f5e72195c7665a5.zip |
Implement ldbl-96 sinl / cosl / sincosl (bug 13851).
Diffstat (limited to 'sysdeps/ieee754/dbl-64/k_rem_pio2.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/k_rem_pio2.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sysdeps/ieee754/dbl-64/k_rem_pio2.c b/sysdeps/ieee754/dbl-64/k_rem_pio2.c index a1e0c6d72d..fcf956afbe 100644 --- a/sysdeps/ieee754/dbl-64/k_rem_pio2.c +++ b/sysdeps/ieee754/dbl-64/k_rem_pio2.c @@ -273,13 +273,16 @@ recompute: y[0] = (ih==0)? fw: -fw; break; case 1: - case 2: - fw = 0.0; - for (i=jz;i>=0;i--) fw += fq[i]; - y[0] = (ih==0)? fw: -fw; - fw = fq[0]-fw; - for (i=1;i<=jz;i++) fw += fq[i]; - y[1] = (ih==0)? fw: -fw; + case 2:; +#if __FLT_EVAL_METHOD__ != 0 + volatile +#endif + double fv = 0.0; + for (i=jz;i>=0;i--) fv += fq[i]; + y[0] = (ih==0)? fv: -fv; + fv = fq[0]-fv; + for (i=1;i<=jz;i++) fv += fq[i]; + y[1] = (ih==0)? fv: -fv; break; case 3: /* painful */ for (i=jz;i>0;i--) { |