mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
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.
This commit is contained in:
parent
2a40d89ff4
commit
0f06be5a4d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153088
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue