diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-03-01 21:15:38 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-03-01 21:15:38 +0000 |
commit | 7b1902cb3e64d340247638a8781770c3a4d850ce (patch) | |
tree | dc06e102ffa43897515baa0d67cbb944b7a45d77 /sysdeps/ieee754 | |
parent | f775c276fd1f89cc9d561db0890a356e7d6e50b8 (diff) | |
download | glibc-7b1902cb3e64d340247638a8781770c3a4d850ce.zip glibc-7b1902cb3e64d340247638a8781770c3a4d850ce.tar.gz glibc-7b1902cb3e64d340247638a8781770c3a4d850ce.tar.bz2 |
Improve erfc accuracy.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/flt-32/s_erff.c | 2 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/s_erfl.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/ieee754/flt-32/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c index 5766183..8a0610d 100644 --- a/sysdeps/ieee754/flt-32/s_erff.c +++ b/sysdeps/ieee754/flt-32/s_erff.c @@ -200,7 +200,7 @@ float __erfcf(float x) sb5+s*(sb6+s*sb7)))))); } GET_FLOAT_WORD(ix,x); - SET_FLOAT_WORD(z,ix&0xfffff000); + SET_FLOAT_WORD(z,ix&0xffffe000); r = __ieee754_expf(-z*z-(float)0.5625)* __ieee754_expf((z-x)*(z+x)+R/S); if(hx>0) return r/x; else return two-r/x; diff --git a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c index 85cdbe0..8868f7e 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c @@ -920,7 +920,8 @@ __erfcl (long double x) } u.value = x; u.parts32.w3 = 0; - u.parts32.w2 &= 0xffffe000; + u.parts32.w2 = 0; + u.parts32.w1 &= 0xf8000000; z = u.value; r = __ieee754_expl (-z * z - 0.5625) * __ieee754_expl ((z - x) * (z + x) + p); |