glibc/sysdeps/x86_64/fpu
Wilco Dijkstra 19a8b9a300 [PATCH 1/7] sin/cos slow paths: avoid slow paths for small inputs
This series of patches removes the slow patchs from sin, cos and sincos.
Besides greatly simplifying the implementation, the new version is also much
faster for inputs up to PI (41% faster) and for large inputs needing range
reduction (27% faster).

ULP is ~0.55 with no errors found after testing 1.6 billion inputs across most
of the range with mpsin and mpcos.  The number of incorrectly rounded results
(ie. ULP >0.5) is at most ~2750 per million inputs between 0.125 and 0.5,
the average is ~850 per million between 0 and PI.

Tested on AArch64 and x86_64 with no regressions.

The first patch removes the slow paths for the cases where the input is small
and doesn't require range reduction.  Update ULP tables for sin, cos and sincos
on AArch64 and x86_64.

	* sysdeps/aarch64/libm-test-ulps: Update ULP for sin, cos, sincos.
	* sysdeps/ieee754/dbl-64/s_sin.c (__sin): Remove slow paths for small
	inputs.
	(__cos): Likewise.
	* sysdeps/x86_64/fpu/libm-test-ulps: Update ULP for sin, cos, sincos.
2018-04-03 16:52:16 +01:00
..
multiarch Remove mplog and mpexp 2018-02-15 12:41:05 +00:00
e_acosl.c
e_atan2l.c
e_exp2l.S
e_exp10l.S
e_expl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
e_fmodl.S
e_ilogbl.S
e_log2l.S Fix i386/x86_64 log2l (sNaN) (bug 20235). 2016-06-09 18:04:30 +00:00
e_log10l.S Fix i386/x86_64 log10l (sNaN) (bug 20228). 2016-06-08 22:59:18 +00:00
e_logl.S Fix i386/x86_64 logl (sNaN) (bug 20227). 2016-06-08 22:24:06 +00:00
e_powl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_remainderl.S
e_scalbl.S Fix i386/x86_64 scalbl with sNaN input (bug 20296). 2016-06-23 22:17:41 +00:00
e_sqrt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_sqrtf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_sqrtl.c
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Implies
libm-test-ulps [PATCH 1/7] sin/cos slow paths: avoid slow paths for small inputs 2018-04-03 16:52:16 +01:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
Makefile Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
math_ldbl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
math_private.h Remove all target specific __ieee754_sqrt(f/l) inlines 2018-03-15 19:21:36 +00:00
math-tests-arch.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_atanl.c
s_ceill.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_copysign.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_copysignf.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_copysignl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_expm1l.S
s_fabs.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fabsf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fabsl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_finitel.S
s_floorl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
s_fmax.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fmaxf.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fmaxl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fmin.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fminf.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fminl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_fpclassifyl.c
s_isinfl.c
s_isnanl.c
s_llrint.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_llrintf.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_llrintl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_log1pl.S Fix i386/x86_64 log1pl (sNaN) (bug 20229). 2016-06-08 23:11:42 +00:00
s_logbl.c
s_lrint.S
s_lrintf.S
s_lrintl.S
s_nearbyintl.S Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00
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. 2018-01-01 00:32:25 +00:00
s_signbitf.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s_significandl.c
s_sincosf.S x86-64: Add sincosf with vector FMA 2018-01-08 08:04:40 -08:00
s_truncl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_cos2_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_cos4_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_cos4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_cos8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_exp2_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_exp4_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_exp4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_exp8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_exp_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_exp_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_log2_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_log4_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_log4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_log8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_log_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_log_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_pow2_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_pow4_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_pow4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_pow8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_pow_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_pow_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sin2_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sin4_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sin4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sin8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sincos2_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sincos4_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sincos4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_sincos8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_trig_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_trig_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_d_wrapper_impl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_finite_alias.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_cosf4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_cosf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_cosf8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_cosf16_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_expf4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_expf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_expf8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_expf16_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_expf_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_expf_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_logf4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_logf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_logf8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_logf16_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_logf_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_logf_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_powf4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_powf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_powf8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_powf16_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_powf_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_powf_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sincosf4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sincosf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sincosf8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sincosf16_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sinf4_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sinf8_core_avx.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sinf8_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_sinf16_core.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_trig_data.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_trig_data.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
svml_s_wrapper_impl.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-libmvec-alias-avx2-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx2-mod.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx2.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx512-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx512-mod.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx512.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx-mod.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-avx.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-double-libmvec-alias-mod.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-libmvec-alias.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-libmvec-sincos-avx2-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-double-libmvec-sincos-avx2.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-double-libmvec-sincos-avx512-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-double-libmvec-sincos-avx512.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-double-libmvec-sincos-avx-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-double-libmvec-sincos-avx.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-double-libmvec-sincos-main.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-libmvec-sincos.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen2-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen4-avx2-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen4-avx2.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen4-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen4.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen8-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-double-vlen8.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-libmvec-alias-avx2-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx2-mod.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx2.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx512-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx512-mod.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx512.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx-mod.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-avx.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-main.c Added tests to ensure linkage through libmvec *_finite aliases which are 2016-06-20 21:15:50 +03:00
test-float-libmvec-alias-mod.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-libmvec-alias.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-libmvec-sincosf-avx2-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-float-libmvec-sincosf-avx2.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-float-libmvec-sincosf-avx512-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-float-libmvec-sincosf-avx512.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-float-libmvec-sincosf-avx-main.c Don't compile do_test with -mavx/-mavx/-mavx512 2016-07-27 11:53:15 -07:00
test-float-libmvec-sincosf-avx.c Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
test-float-libmvec-sincosf-main.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-libmvec-sincosf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen4-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen8-avx2-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen8-avx2.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen8-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen8.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen16-wrappers.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-float-vlen16.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-libmvec-alias-mod.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Versions
x86_64-math-asm.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00