glibc/sysdeps/ieee754
Joseph Myers e4e52ff059 Improve float range reduction accuracy near pi/2 (bug 21094).
Bug 21094 reports 3ulp errors of cosf and tanf for certain arguments
near pi/2 arising from the use of an insufficiently accurate range
reduction.  (To be clear, this is a quality-of-implementation issue
relating to the apparent intent of those particular cosf and tanf
implementations; 3ulp is within the general glibc accuracy goals, so
not inherently a bug.)

This patch fixes that error by making a wider range of cases use the
existing more accurate range reduction for arguments close to pi/2.
The wider range of values is still narrow enough for the "z -=
pio2_2;" in the more accurate case to be exact, as the code expects.

Tested for x86_64, x86 and mips64; no ulps updates needed (but at
least on mips64, the larger ulps were seen if the tests were added
without the substantive fix).

	[BZ #21094]
	* sysdeps/ieee754/flt-32/e_rem_pio2f.c (__ieee754_rem_pio2f): Use
	24+24+24-bit pi for wider range of values around pi/2.
	* math/auto-libm-test-in: Add more tests of cos and tan.
	* math/auto-libm-test-out-cos: Regenerated.
	* math/auto-libm-test-out-tan: Likewise.
2017-03-15 22:00:54 +00:00
..
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dbl-64 Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
flt-32 Improve float range reduction accuracy near pi/2 (bug 21094). 2017-03-15 22:00:54 +00:00
ldbl-64-128 Move w_exp to libm-compat-call-auto 2017-02-08 17:44:20 -02:00
ldbl-96 Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
ldbl-128 Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
ldbl-128ibm Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
ldbl-opt Move w_exp to libm-compat-call-auto 2017-02-08 17:44:20 -02:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
k_standard.c Fix pow (qNaN, 0) result with -lieee (bug 20919), remove dead parts of wrappers. 2016-12-02 22:50:46 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
k_standardl.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_matherr.c
s_signgam.c Fix lgamma setting signgam for ISO C (bug 15421). 2015-11-20 22:49:59 +00:00