glibc/sysdeps/x86_64/fpu
Joseph Myers a8e2112ae3 Use round-to-nearest internally in jn, test with ALL_RM_TEST (bug 18602).
Some existing jn tests, if run in non-default rounding modes, produce
errors above those accepted in glibc, which causes problems for moving
tests of jn to use ALL_RM_TEST.  This patch makes jn set rounding
to-nearest internally, as was done for yn some time ago, then computes
the appropriate underflowing value for results that underflowed to
zero in to-nearest, and moves the tests to ALL_RM_TEST.  It does
nothing about the general inaccuracy of Bessel function
implementations in glibc, though it should make jn more accurate on
average in non-default rounding modes through reduced error
accumulation.  The recomputation of results that underflowed to zero
should as a side-effect fix some cases of bug 16559, where jn just
used an exact zero, but that is *not* the goal of this patch and other
cases of that bug remain unfixed.

(Most of the changes in the patch are reindentation to add new scopes
for SET_RESTORE_ROUND*.)

Tested for x86_64, x86, powerpc and mips64.

	[BZ #16559]
	[BZ #18602]
	* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Set
	round-to-nearest internally then recompute results that
	underflowed to zero in the original rounding mode.
	* sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise.
	* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise
	* math/libm-test.inc (jn_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-25 21:46:02 +00:00
..
multiarch Combination of data tables for x86_64 vector functions sinf, cosf and sincosf. 2015-06-24 17:44:35 +03:00
dla.h Remove x86_64 __GNUC_PREREQ (4, 6) conditional. 2014-11-14 18:53:07 +00:00
e_acosl.c
e_atan2l.c
e_exp2l.S Fix exp2 spurious underflows (bug 16560). 2015-02-12 19:02:45 +00:00
e_exp10l.S Fix exp10 inaccuracy and exceptions (bugs 13884, 13914). 2012-05-06 18:23:44 +00:00
e_expf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_expl.S Fix x86_64 / x86 expm1l (-min_subnorm) result sign (bug 18569). 2015-06-21 18:43:10 +00:00
e_fmodl.S Optimize libm 2011-10-12 11:27:51 -04:00
e_ilogbl.S Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_log2l.S Fix log2 (1) in round-downward mode (bug 17042). 2014-06-10 12:07:15 +00:00
e_log10l.S Fix log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +00:00
e_logl.S Fix __ieee754_logl (-LDBL_MAX) in FE_DOWNWARD mode (bug 17022). 2014-06-18 12:32:01 +00:00
e_powl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_remainderl.S Optimize libm 2011-10-12 11:27:51 -04:00
e_scalbl.S Fix x86/x86_64 scalb (qNaN, -Inf) (bug 16783). 2015-02-24 17:30:02 +00:00
e_sqrt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_sqrtf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_sqrtl.c
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fegetround.c Fix libm fegetround namespace (bug 17748). 2015-01-02 20:44:42 +00:00
feholdexcpt.c Fix libm feholdexcept namespace (bug 17748). 2015-01-05 23:06:14 +00:00
fesetenv.c Fix libm fesetenv namespace (bug 17748). 2015-01-06 23:36:20 +00:00
fesetround.c Fix libm fesetround namespace (bug 17748). 2015-01-07 00:41:23 +00:00
feupdateenv.c Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Implies Use x86_64 fpu/bits/fenv.h for i386 and x86_64 2012-06-06 10:13:19 -07:00
k_rem_pio2l.c Dummy files to prevent stub versions from being used. 2007-05-17 18:39:55 +00:00
libm-test-ulps Use round-to-nearest internally in jn, test with ALL_RM_TEST (bug 18602). 2015-06-25 21:46:02 +00:00
Makefile Combination of data tables for x86_64 vector functions sinf, cosf and sincosf. 2015-06-24 17:44:35 +03:00
math_ldbl.h
math_private.h Use movq for 64-bit operations 2013-05-15 20:33:45 +02:00
math-tests-arch.h Addition of testing infrastructure for vector math functions. 2015-06-09 14:51:52 +03:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_atanl.c
s_ceill.S Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_copysign.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_copysignf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_copysignl.S Update. 2002-07-06 15:07:30 +00:00
s_cosf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_expm1l.S Fix x86/x86_64 expm1l inaccuracy and exceptions (bugs 13885, 13923). 2012-05-07 19:13:08 +00:00
s_fabs.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fabsf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fabsl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fdiml.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_finitel.S Update. 2002-09-10 01:40:26 +00:00
s_floorl.S Update. 2003-11-18 07:25:02 +00:00
s_fmax.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fmaxf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fmaxl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fmin.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fminf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fminl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fpclassifyl.c
s_isinfl.c
s_isnanl.c
s_llrint.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_llrintf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_llrintl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_log1pl.S Set errno for log1p on pole/domain error. 2015-04-13 21:19:27 +02:00
s_logbl.c
s_lrint.S lrint and llrint implementation for x86-64. 2002-04-08 08:14:22 +00:00
s_lrintf.S lrint and llrint implementation for x86-64. 2002-04-08 08:14:22 +00:00
s_lrintl.S lrint and llrint implementation for x86-64. 2002-04-08 08:14:22 +00:00
s_nearbyintl.S Update. 2003-11-18 07:25:02 +00:00
s_nextafterl.c
s_nexttoward.c
s_nexttowardf.c
s_rintl.c
s_scalbnl.S Update. 2003-11-18 07:25:02 +00:00
s_signbit.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_signbitf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_significandl.c
s_sincosf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_sinf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_truncl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
svml_d_cos2_core.S Combination of data tables for x86_64 vector functions sin, cos and sincos. 2015-06-23 19:21:50 +03:00
svml_d_cos4_core_avx.S Start of series of patches with x86_64 vector math functions. 2015-06-09 14:25:49 +03:00
svml_d_cos4_core.S Combination of data tables for x86_64 vector functions sin, cos and sincos. 2015-06-23 19:21:50 +03:00
svml_d_cos8_core.S Combination of data tables for x86_64 vector functions sin, cos and sincos. 2015-06-23 19:21:50 +03:00
svml_d_exp2_core.S Vector exp for x86_64 and tests. 2015-06-17 15:58:05 +03:00
svml_d_exp4_core_avx.S Vector exp for x86_64 and tests. 2015-06-17 15:58:05 +03:00
svml_d_exp4_core.S Vector exp for x86_64 and tests. 2015-06-17 15:58:05 +03:00
svml_d_exp8_core.S Vector exp for x86_64 and tests. 2015-06-17 15:58:05 +03:00
svml_d_exp_data.h Vector exp for x86_64 and tests. 2015-06-17 15:58:05 +03:00
svml_d_exp_data.S Vector exp for x86_64 and tests. 2015-06-17 15:58:05 +03:00
svml_d_log2_core.S Vector log for x86_64 and tests. 2015-06-17 15:38:29 +03:00
svml_d_log4_core_avx.S Vector log for x86_64 and tests. 2015-06-17 15:38:29 +03:00
svml_d_log4_core.S Vector log for x86_64 and tests. 2015-06-17 15:38:29 +03:00
svml_d_log8_core.S Vector log for x86_64 and tests. 2015-06-17 15:38:29 +03:00
svml_d_log_data.h Vector log for x86_64 and tests. 2015-06-17 15:38:29 +03:00
svml_d_log_data.S Vector log for x86_64 and tests. 2015-06-17 15:38:29 +03:00
svml_d_pow2_core.S Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
svml_d_pow4_core_avx.S Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
svml_d_pow4_core.S Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
svml_d_pow8_core.S Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
svml_d_pow_data.h Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
svml_d_pow_data.S Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
svml_d_sin2_core.S Vector sin for x86_64 and tests. 2015-06-11 17:12:38 +03:00
svml_d_sin4_core_avx.S Vector sin for x86_64 and tests. 2015-06-11 17:12:38 +03:00
svml_d_sin4_core.S Vector sin for x86_64 and tests. 2015-06-11 17:12:38 +03:00
svml_d_sin8_core.S Vector sin for x86_64 and tests. 2015-06-11 17:12:38 +03:00
svml_d_sincos2_core.S Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
svml_d_sincos4_core_avx.S Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
svml_d_sincos4_core.S Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
svml_d_sincos8_core.S Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
svml_d_trig_data.h Combination of data tables for x86_64 vector functions sin, cos and sincos. 2015-06-23 19:21:50 +03:00
svml_d_trig_data.S Combination of data tables for x86_64 vector functions sin, cos and sincos. 2015-06-23 19:21:50 +03:00
svml_d_wrapper_impl.h Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
svml_s_cosf4_core.S Vector cosf for x86_64. 2015-06-09 18:29:47 +03:00
svml_s_cosf8_core_avx.S Vector cosf for x86_64. 2015-06-09 18:29:47 +03:00
svml_s_cosf8_core.S Vector cosf for x86_64. 2015-06-09 18:29:47 +03:00
svml_s_cosf16_core.S Vector cosf for x86_64. 2015-06-09 18:29:47 +03:00
svml_s_expf4_core.S Vector expf for x86_64 and tests. 2015-06-17 16:10:51 +03:00
svml_s_expf8_core_avx.S Vector expf for x86_64 and tests. 2015-06-17 16:10:51 +03:00
svml_s_expf8_core.S Vector expf for x86_64 and tests. 2015-06-17 16:10:51 +03:00
svml_s_expf16_core.S Vector expf for x86_64 and tests. 2015-06-17 16:10:51 +03:00
svml_s_expf_data.h Vector expf for x86_64 and tests. 2015-06-17 16:10:51 +03:00
svml_s_expf_data.S Vector expf for x86_64 and tests. 2015-06-17 16:10:51 +03:00
svml_s_logf4_core.S Vector logf for x86_64 and tests. 2015-06-17 15:53:00 +03:00
svml_s_logf8_core_avx.S Vector logf for x86_64 and tests. 2015-06-17 15:53:00 +03:00
svml_s_logf8_core.S Vector logf for x86_64 and tests. 2015-06-17 15:53:00 +03:00
svml_s_logf16_core.S Vector logf for x86_64 and tests. 2015-06-17 15:53:00 +03:00
svml_s_logf_data.h Vector logf for x86_64 and tests. 2015-06-17 15:53:00 +03:00
svml_s_logf_data.S Vector logf for x86_64 and tests. 2015-06-17 15:53:00 +03:00
svml_s_powf4_core.S Vector powf for x86_64 and tests. 2015-06-18 17:04:07 +03:00
svml_s_powf8_core_avx.S Vector powf for x86_64 and tests. 2015-06-18 17:04:07 +03:00
svml_s_powf8_core.S Vector powf for x86_64 and tests. 2015-06-18 17:04:07 +03:00
svml_s_powf16_core.S Vector powf for x86_64 and tests. 2015-06-18 17:04:07 +03:00
svml_s_powf_data.h Vector powf for x86_64 and tests. 2015-06-18 17:04:07 +03:00
svml_s_powf_data.S Vector powf for x86_64 and tests. 2015-06-18 17:04:07 +03:00
svml_s_sincosf4_core.S Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
svml_s_sincosf8_core_avx.S Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
svml_s_sincosf8_core.S Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
svml_s_sincosf16_core.S Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
svml_s_sinf4_core.S Vector sinf for x86_64 and tests. 2015-06-15 15:06:53 +03:00
svml_s_sinf8_core_avx.S Vector sinf for x86_64 and tests. 2015-06-15 15:06:53 +03:00
svml_s_sinf8_core.S Vector sinf for x86_64 and tests. 2015-06-15 15:06:53 +03:00
svml_s_sinf16_core.S Vector sinf for x86_64 and tests. 2015-06-15 15:06:53 +03:00
svml_s_trig_data.h Combination of data tables for x86_64 vector functions sinf, cosf and sincosf. 2015-06-24 17:44:35 +03:00
svml_s_trig_data.S Combination of data tables for x86_64 vector functions sinf, cosf and sincosf. 2015-06-24 17:44:35 +03:00
svml_s_wrapper_impl.h Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
test-double-vlen2-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-double-vlen2.c Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
test-double-vlen4-avx2-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-double-vlen4-avx2.c Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
test-double-vlen4-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-double-vlen4.c Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
test-double-vlen8-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-double-vlen8.c Vector sincos for x86_64 and tests. 2015-06-18 17:55:55 +03:00
test-float-vlen4-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-float-vlen4.c Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
test-float-vlen8-avx2-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-float-vlen8-avx2.c Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
test-float-vlen8-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-float-vlen8.c Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
test-float-vlen16-wrappers.c Refactor libm tests. 2015-06-24 23:27:18 +00:00
test-float-vlen16.c Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00
Versions Vector sincosf for x86_64 and tests. 2015-06-18 20:11:27 +03:00