glibc/sysdeps/x86_64/fpu
Joseph Myers e02920bc02 Improve tgamma accuracy (bug 18613).
In non-default rounding modes, tgamma can be slightly less accurate
than permitted by glibc's accuracy goals.

Part of the problem is error accumulation, addressed in this patch by
setting round-to-nearest for internal computations.  However, there
was also a bug in the code dealing with computing pow (x + n, x + n)
where x + n is not exactly representable, providing another source of
error even in round-to-nearest mode; it was necessary to address both
bugs to get errors for all testcases within glibc's accuracy goals.
Given this second fix, accuracy in round-to-nearest mode is also
improved (hence regeneration of ulps for tgamma should be from scratch
- truncate libm-test-ulps or at least remove existing tgamma entries -
so that the expected ulps can be reduced).

Some additional complications also arose.  Certain tgamma tests should
strictly, according to IEEE semantics, overflow or not depending on
the rounding mode; this is beyond the scope of glibc's accuracy goals
for any function without exactly-determined results, but
gen-auto-libm-tests doesn't handle being lax there as it does for
underflow.  (libm-test.inc also doesn't handle being lax about whether
the result in cases very close to the overflow threshold is infinity
or a finite value close to overflow, but that doesn't cause problems
in this case though I've seen it cause problems with random test
generation for some functions.)  Thus, spurious-overflow markings,
with a comment, are added to auto-libm-test-in (no bug in Bugzilla
because the issue is with the testsuite, not a user-visible bug in
glibc).  And on x86, after the patch I saw ERANGE issues as previously
reported by Carlos (see my commentary in
<https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which
needed addressing by ensuring excess range and precision were
eliminated at various points if FLT_EVAL_METHOD != 0.

I also noticed and fixed a cosmetic issue where 1.0f was used in long
double functions and should have been 1.0L.

This completes the move of all functions to testing in all rounding
modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to
remove the workaround for some functions not using ALL_RM_TEST.

Tested for x86_64, x86, mips64 and powerpc.

	[BZ #18613]
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of
	X_ADJ not X when adjusting exponent.
	(__ieee754_gamma_r): Do intermediate computations in
	round-to-nearest then adjust overflowing and underflowing results
	as needed.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log
	of X_ADJ not X when adjusting exponent.
	(__ieee754_gammaf_r): Do intermediate computations in
	round-to-nearest then adjust overflowing and underflowing results
	as needed.
	* sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take
	log of X_ADJ not X when adjusting exponent.
	(__ieee754_gammal_r): Do intermediate computations in
	round-to-nearest then adjust overflowing and underflowing results
	as needed.  Use 1.0L not 1.0f as numerator of division.
	* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take
	log of X_ADJ not X when adjusting exponent.
	(__ieee754_gammal_r): Do intermediate computations in
	round-to-nearest then adjust overflowing and underflowing results
	as needed.  Use 1.0L not 1.0f as numerator of division.
	* sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log
	of X_ADJ not X when adjusting exponent.
	(__ieee754_gammal_r): Do intermediate computations in
	round-to-nearest then adjust overflowing and underflowing results
	as needed.  Use 1.0L not 1.0f as numerator of division.
	* math/libm-test.inc (tgamma_test_data): Remove one test.  Moved
	to auto-libm-test-in.
	(tgamma_test): Use ALL_RM_TEST.
	* math/auto-libm-test-in: Add one test of tgamma.  Mark some other
	tests of tgamma with spurious-overflow.
	* math/auto-libm-test-out: Regenerated.
	* math/gen-libm-have-vector-test.sh: Do not check for START.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-29 23:29:35 +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
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
e_ilogbl.S
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
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
libm-test-ulps Improve tgamma accuracy (bug 18613). 2015-06-29 23:29:35 +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
s_cosf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_expm1l.S
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
s_floorl.S
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
s_lrintf.S
s_lrintl.S
s_nearbyintl.S
s_nextafterl.c
s_nexttoward.c
s_nexttowardf.c
s_rintl.c
s_scalbnl.S
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