glibc/sysdeps/ieee754/ldbl-128ibm
Joseph Myers be25493251 Fix yn overflow handling in non-default rounding modes (bug 16561, bug 16562).
This patch fixes bugs 16561 and 16562, bad results of yn in overflow
cases in non-default rounding modes, both because an intermediate
overflow in the recurrence does not get detected if the result is not
an infinity and because an overflowing result may occur in the wrong
sign.  The fix is to set FE_TONEAREST mode internally for the parts of
the function where such overflows can occur (which includes the call
to y1 - where yn is used to compute a Bessel function of order -1,
negating the result of y1 isn't correct for overflowing results in
directed rounding modes) and then compute an overflowing value in the
original rounding mode if the to-nearest result was an infinity.

Tested x86_64 and x86 and ulps updated accordingly.  Also tested for
mips64 and powerpc32 to test the ldbl-128 and ldbl-128ibm changes.

(The tests for these bugs were added in my previous y1 patch, so the
only thing this patch has to do with the testsuite is enable yn
testing in all rounding modes.)

	[BZ #16561]
	[BZ #16562]
	* sysdeps/ieee754/dbl-64/e_jn.c: Include <float.h>.
	(__ieee754_yn): Set FE_TONEAREST mode internally and then
	recompute overflowing results in original rounding mode.
	* sysdeps/ieee754/flt-32/e_jnf.c: Include <float.h>.
	(__ieee754_ynf): Set FE_TONEAREST mode internally and then
	recompute overflowing results in original rounding mode.
	* sysdeps/ieee754/ldbl-128/e_jnl.c: Include <float.h>.
	(__ieee754_ynl): Set FE_TONEAREST mode internally and then
	recompute overflowing results in original rounding mode.
	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Include <float.h>.
	(__ieee754_ynl): Set FE_TONEAREST mode internally and then
	recompute overflowing results in original rounding mode.
	* sysdeps/ieee754/ldbl-96/e_jnl.c: Include <float.h>.
	(__ieee754_ynl): Set FE_TONEAREST mode internally and then
	recompute overflowing results in original rounding mode.
	* sysdeps/i386/fpu/fenv_private.h [!__SSE2_MATH__]
	(libc_feholdsetround_ctx): New macro.
	* math/libm-test.inc (yn_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps : Likewise.
2014-06-27 14:52:13 +00:00
..
e_acoshl.c Fix ldbl-128ibm acoshl inaccuracy (bug 16384). 2014-01-02 16:33:06 +00:00
e_acosl.c Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl. 2013-10-10 19:11:30 +00:00
e_asinl.c Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl. 2013-10-10 19:11:30 +00:00
e_atan2l.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
e_atanhl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
e_coshl.c Fix cosh spurious underflows from expm1 (bug 16354), inaccurate results near 0 (bug 17061). 2014-06-23 20:20:10 +00:00
e_exp10l.c Fix exp10 spurious underflows (bug 16560). 2014-06-25 11:33:22 +00:00
e_expl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_fmodl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_gammal_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_hypotl.c PowerPC floating point little-endian [4 of 15] 2013-10-04 10:32:48 +09:30
e_ilogbl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
e_j0l.c 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
e_j1l.c 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
e_jnl.c Fix yn overflow handling in non-default rounding modes (bug 16561, bug 16562). 2014-06-27 14:52:13 +00:00
e_lgammal_r.c 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
e_log2l.c Fix log2 (1) in round-downward mode (bug 17042). 2014-06-10 12:07:15 +00:00
e_log10l.c Fix log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +00:00
e_logl.c Fix ldbl-128ibm logl inaccuracy (bug 16386). 2014-01-02 16:35:46 +00:00
e_powl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
e_rem_pio2l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_remainderl.c PowerPC floating point little-endian [4 of 15] 2013-10-04 10:32:48 +09:30
e_sinhl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
e_sqrtl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gamma_productl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ieee754.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_cosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_sincosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_sinl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_tanl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
ldbl2mpn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
math_ldbl.h Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
mpn2ldbl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
printf_fphex.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_asinhl.c Fix ldbl-128ibm asinhl inaccuracy (bug 16385). 2014-01-02 16:34:24 +00:00
s_atanl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_cbrtl.c 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
s_ceill.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_copysignl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_cosl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_cprojl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_ctanhl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_ctanl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_erfl.c Fix erf underflow handling near 0 (bug 16516). 2014-05-14 12:34:03 +00:00
s_expm1l.c Fix ldbl-128ibm expm1l on large arguments (bug 16408). 2014-01-08 13:32:39 +00:00
s_fabsl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_finitel.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_floorl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fpclassifyl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_frexpl.c Correct IBM long double frexpl. 2014-04-16 19:33:32 +09:30
s_isinf_nsl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_isinfl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_isnanl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_issignalingl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_llrintl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_llroundl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_log1pl.c Fix log1pl (LDBL_MAX) in FE_UPWARD mode (bug 16564). 2014-05-14 12:38:56 +00:00
s_logbl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_lrintl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_lroundl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_modfl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_nearbyintl.c PowerPC: Fix nearbyintl failure for few inputs 2014-06-17 08:46:25 -05:00
s_nextafterl.c Correct IBM long double nextafterl. 2014-04-02 13:46:19 +10:30
s_nexttoward.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_nexttowardf.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_remquol.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_rintl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_roundl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_scalblnl.c [BZ #6803] Set errno for scalbln, scalbn 2014-06-20 07:48:20 +05:30
s_scalbnl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_signbitl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_sincosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_sinl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_tanhl.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
s_tanl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_truncl.c PowerPC: remove wrong truncl implementation for PowerPC64 2014-01-08 08:14:48 -06:00
strtold_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
t_sincosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_expl.c BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibm 2013-03-22 12:39:10 -03:00
w_scalblnl.c [BZ #6803] Set errno for scalbln, scalbn 2014-06-20 07:48:20 +05:30
x2y2m1l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00