summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2005-12-04 13:52:46 +0000
committerbde <bde@FreeBSD.org>2005-12-04 13:52:46 +0000
commit94a6bce548e56a97401cec648c798d1d76e2e7b3 (patch)
treecad43f3ffc590bd7061d747cfcba412b58b3fc46
parent45281956926162fc9e81fccc847f9ec1f96fa2a8 (diff)
downloadFreeBSD-src-94a6bce548e56a97401cec648c798d1d76e2e7b3.zip
FreeBSD-src-94a6bce548e56a97401cec648c798d1d76e2e7b3.tar.gz
Fixed the approximation to pio4. pio4_hi must be pio2_hi/2 since it
shares its low half with pio2_hi. pio2_hi is rounded down although rounding to nearest would be a tiny bit better, so pio4_hi must be rounded down too. It was rounded to nearest, which happens to be different in float precision but the same in double precision. This fixes about 13.5 million errors of more than 1 ulp in asinf(). The largest error was 2.81 ulps on amd64 and 2.57 ulps on i386 -O1. Now the largest error is 0.93 ulps on amd65 and 0.67 ulps on i386 -O1.
-rw-r--r--lib/msun/src/e_asinf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msun/src/e_asinf.c b/lib/msun/src/e_asinf.c
index 178289a..c0cf8a4 100644
--- a/lib/msun/src/e_asinf.c
+++ b/lib/msun/src/e_asinf.c
@@ -25,7 +25,7 @@ one = 1.0000000000e+00, /* 0x3F800000 */
huge = 1.000e+30,
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
pio2_lo = 7.5497894159e-08, /* 0x33a22168 */
-pio4_hi = 7.8539818525e-01, /* 0x3f490fdb */
+pio4_hi = 7.8539812565e-01, /* 0x3f490fda */
/* coefficient for R(x^2) */
pS0 = 1.6666667163e-01, /* 0x3e2aaaab */
pS1 = -3.2556581497e-01, /* 0xbea6b090 */
OpenPOWER on IntegriCloud