glibc/math
Joseph Myers 2f0a0f4427 Automatically check sanity of ulps from libm tests.
This patch makes libm-test.inc apply sanity checks to ulps values
resulting from tests, or found in libm-test-ulps files, to avoid the
need for manual checking/editing of new ulps for cases that are
excessively large or involve functions that should not have any ulps.
For IBM long double, errors must be at most 14ulp (the largest
currently checked-in value), or at most 3ulp (the documented error
bound for division) in the case of exactly-determined functions; for
other formats, the limits are 9ulp (also the largest currently
checked-in value) and 0ulp.  Limits from ulps files are saturated to
those bounds, and regen-ulps will ignore any errors outside those
bounds.  (Thus if, say, you have an architecture-specific problem with
fma, the tests can still be XFAILed in auto-libm-test-in, but errors
outside the permitted range can no longer be listed in
libm-test-ulps.)

Tested x86_64.

	* math/libm-test.inc (max_valid_error): New variable.
	(init_max_error): Take new argument specifying whether function
	results are exactly determined.  Set max_valid_error and bound
	other variables for errors based on this argument.
	(set_max_error): Do not record results above max_valid_error.
	(check_float_internal): Only accept errors of up to 0.5ulps if
	also at most max_valid_error.
	(START): Take new argument EXACT and pass it to init_max_error.
	(acos_test): Update call to START.
	(acos_test_tonearest): Likewise.
	(acos_test_towardzero): Likewise.
	(acos_test_downward): Likewise.
	(acos_test_upward): Likewise.
	(acosh_test): Likewise.
	(asin_test): Likewise.
	(asin_test_tonearest): Likewise.
	(asin_test_towardzero): Likewise.
	(asin_test_downward): Likewise.
	(asin_test_upward): Likewise.
	(asinh_test): Likewise.
	(atan_test): Likewise.
	(atanh_test): Likewise.
	(atan2_test): Likewise.
	(cabs_test): Likewise.
	(cacos_test): Likewise.
	(cacosh_test): Likewise.
	(carg_test): Likewise.
	(casin_test): Likewise.
	(casinh_test): Likewise.
	(catan_test): Likewise.
	(catanh_test): Likewise.
	(cbrt_test): Likewise.
	(ccos_test): Likewise.
	(ccosh_test): Likewise.
	(ceil_test): Likewise.
	(cexp_test): Likewise.
	(cimag_test): Likewise.
	(clog_test): Likewise.
	(clog10_test): Likewise.
	(conj_test): Likewise.
	(copysign_test): Likewise.
	(cos_test): Likewise.
	(cos_test_tonearest): Likewise.
	(cos_test_towardzero): Likewise.
	(cos_test_downward): Likewise.
	(cos_test_upward): Likewise.
	(cosh_test): Likewise.
	(cosh_test_tonearest): Likewise.
	(cosh_test_towardzero): Likewise.
	(cosh_test_downward): Likewise.
	(cosh_test_upward): Likewise.
	(cpow_test): Likewise.
	(cproj_test): Likewise.
	(creal_test): Likewise.
	(csin_test): Likewise.
	(csinh_test): Likewise.
	(csqrt_test): Likewise.
	(ctan_test): Likewise.
	(ctan_test_tonearest): Likewise.
	(ctan_test_towardzero): Likewise.
	(ctan_test_downward): Likewise.
	(ctan_test_upward): Likewise.
	(ctanh_test): Likewise.
	(ctanh_test_tonearest): Likewise.
	(ctanh_test_towardzero): Likewise.
	(ctanh_test_downward): Likewise.
	(ctanh_test_upward): Likewise.
	(erf_test): Likewise.
	(erfc_test): Likewise.
	(exp_test): Likewise.
	(exp_test_tonearest): Likewise.
	(exp_test_towardzero): Likewise.
	(exp_test_downward): Likewise.
	(exp_test_upward): Likewise.
	(exp10_test): Likewise.
	(exp10_test_tonearest): Likewise.
	(exp10_test_towardzero): Likewise.
	(exp10_test_downward): Likewise.
	(exp10_test_upward): Likewise.
	(pow10_test): Likewise.
	(exp2_test): Likewise.
	(expm1_test): Likewise.
	(expm1_test_tonearest): Likewise.
	(expm1_test_towardzero): Likewise.
	(expm1_test_downward): Likewise.
	(expm1_test_upward): Likewise.
	(fabs_test): Likewise.
	(fdim_test): Likewise.
	(floor_test): Likewise.
	(fma_test): Likewise.
	(fma_test_towardzero): Likewise.
	(fma_test_downward): Likewise.
	(fma_test_upward): Likewise.
	(fmax_test): Likewise.
	(fmin_test): Likewise.
	(fmod_test): Likewise.
	(fpclassify_test): Likewise.
	(frexp_test): Likewise.
	(hypot_test): Likewise.
	(ilogb_test): Likewise.
	(isfinite_test): Likewise.
	(finite_test): Likewise.
	(isgreater_test): Likewise.
	(isgreaterequal_test): Likewise.
	(isinf_test): Likewise.
	(isless_test): Likewise.
	(islessequal_test): Likewise.
	(islessgreater_test): Likewise.
	(isnan_test): Likewise.
	(isnormal_test): Likewise.
	(issignaling_test): Likewise.
	(isunordered_test): Likewise.
	(j0_test): Likewise.
	(j1_test): Likewise.
	(jn_test): Likewise.
	(ldexp_test): Likewise.
	(lgamma_test): Likewise.
	(gamma_test): Likewise.
	(lrint_test): Likewise.
	(lrint_test_tonearest): Likewise.
	(lrint_test_towardzero): Likewise.
	(lrint_test_downward): Likewise.
	(lrint_test_upward): Likewise.
	(llrint_test): Likewise.
	(llrint_test_tonearest): Likewise.
	(llrint_test_towardzero): Likewise.
	(llrint_test_downward): Likewise.
	(llrint_test_upward): Likewise.
	(log_test): Likewise.
	(log10_test): Likewise.
	(log1p_test): Likewise.
	(log2_test): Likewise.
	(logb_test): Likewise.
	(logb_test_downward): Likewise.
	(lround_test): Likewise.
	(llround_test): Likewise.
	(modf_test): Likewise.
	(nearbyint_test): Likewise.
	(nextafter_test): Likewise.
	(nexttoward_test): Likewise.
	(pow_test): Likewise.
	(pow_test_tonearest): Likewise.
	(pow_test_towardzero): Likewise.
	(pow_test_downward): Likewise.
	(pow_test_upward): Likewise.
	(remainder_test): Likewise.
	(drem_test): Likewise.
	(remainder_test_tonearest): Likewise.
	(drem_test_tonearest): Likewise.
	(remainder_test_towardzero): Likewise.
	(drem_test_towardzero): Likewise.
	(remainder_test_downward): Likewise.
	(drem_test_downward): Likewise.
	(remainder_test_upward): Likewise.
	(drem_test_upward): Likewise.
	(remquo_test): Likewise.
	(rint_test): Likewise.
	(rint_test_tonearest): Likewise.
	(rint_test_towardzero): Likewise.
	(rint_test_downward): Likewise.
	(rint_test_upward): Likewise.
	(round_test): Likewise.
	(scalb_test): Likewise.
	(scalbn_test): Likewise.
	(scalbln_test): Likewise.
	(signbit_test): Likewise.
	(sin_test): Likewise.
	(sin_test_tonearest): Likewise.
	(sin_test_towardzero): Likewise.
	(sin_test_downward): Likewise.
	(sin_test_upward): Likewise.
	(sincos_test): Likewise.
	(sinh_test): Likewise.
	(sinh_test_tonearest): Likewise.
	(sinh_test_towardzero): Likewise.
	(sinh_test_downward): Likewise.
	(sinh_test_upward): Likewise.
	(sqrt_test): Likewise.
	(sqrt_test_tonearest): Likewise.
	(sqrt_test_towardzero): Likewise.
	(sqrt_test_downward): Likewise.
	(sqrt_test_upward): Likewise.
	(tan_test): Likewise.
	(tan_test_tonearest): Likewise.
	(tan_test_towardzero): Likewise.
	(tan_test_downward): Likewise.
	(tan_test_upward): Likewise.
	(tanh_test): Likewise.
	(tgamma_test): Likewise.
	(trunc_test): Likewise.
	(y0_test): Likewise.
	(y1_test): Likewise.
	(yn_test): Likewise.
	(significand_test): Likewise.
2014-03-05 15:05:20 +00:00
..
bits Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
machine Update. 1999-07-14 00:54:57 +00:00
Makefile Consistently include Makeconfig after defining subdir. 2014-02-26 23:12:03 +00:00
README.libm-test Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
Versions New <math.h> macro named issignaling to check for a signaling NaN (sNaN). 2013-04-02 13:51:02 +02:00
atest-exp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atest-exp2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atest-sincos.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
auto-libm-test-in Fix sign of input to bsloww1 (BZ #16623) 2014-02-27 21:12:09 +05:30
auto-libm-test-out Fix sign of input to bsloww1 (BZ #16623) 2014-02-27 21:12:09 +05:30
basic-test.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bug-nextafter.c Make more libm tests condition exceptions tests with math-tests.h. 2013-06-12 12:41:25 +00:00
bug-nexttoward.c Make more libm tests condition exceptions tests with math-tests.h. 2013-06-12 12:41:25 +00:00
bug-tgmath1.c Update. 2004-05-07 02:14:18 +00:00
cabs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cabsf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cabsl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
carg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cargf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cargl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cimag.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cimagf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cimagl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
complex.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
conj.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
conjf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
conjl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
creal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
crealf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
creall.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
divtc3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_acoshl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_acosl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_asinl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_atan2l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_atanhl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_coshl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_exp2l.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_exp10.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_exp10f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_exp10l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_expl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_fmodl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_gammal_r.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_hypotl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_j0l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_j1l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_jnl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_lgammal_r.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_log2l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_log10l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_logl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_powl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_rem_pio2l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_scalb.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_scalbf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_scalbl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_sinhl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
e_sqrtl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
fclrexcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fedisblxcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
feenablxcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fegetenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fegetexcept.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fegetround.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
feholdexcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fenv.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fesetenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fesetround.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
feupdateenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fgetexcptflg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fpu_control.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fraiseexcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fsetexcptflg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ftestexcept.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gen-auto-libm-tests.c Move tests of fma from libm-test.inc to auto-libm-test-in. 2014-02-18 21:48:51 +00:00
gen-libm-test.pl Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
ieee-math.c * hurd/hurdinit.c (map0): Remove [!PIC] conditional. 1996-06-16 09:31:23 +00:00
k_casinh.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_casinhf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_casinhl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_cosl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
k_rem_pio2l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
k_sincosl.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
k_sinl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
k_tanl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
libm-test.inc Automatically check sanity of ulps from libm tests. 2014-03-05 15:05:20 +00:00
math.h Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
multc3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_asinhl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
s_atanl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
s_cacos.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cacosf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cacosh.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cacoshf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cacoshl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cacosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_casin.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_casinf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_casinh.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_casinhf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_casinhl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_casinl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_catan.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_catanf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_catanh.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_catanhf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_catanhl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_catanl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_cbrtl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
s_ccos.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_ccosf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_ccosh.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ccoshf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ccoshl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ccosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cexp.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_cexpf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_cexpl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_clog.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_clog10.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_clog10f.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_clog10l.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_clogf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_clogl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_cpow.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cpowf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cpowl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cproj.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cprojf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_cprojl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_csin.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csinf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csinh.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csinhf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csinhl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csinl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csqrt.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csqrtf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_csqrtl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ctan.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ctanf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ctanh.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ctanhf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ctanhl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_ctanl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_erfl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
s_expm1l.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
s_fdim.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fdimf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fdiml.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fma.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmaf.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_fmax.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmaxf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmaxl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmin.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fminf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fminl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_ldexp.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_ldexpf.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_ldexpl.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_log1pl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
s_nan.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_nanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_nanl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_nextafter.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_nexttowardf.c Fix nexttoward bugs (bugs 2550, 2570). 2012-05-01 15:37:43 +00:00
s_nexttowardl.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
s_significand.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_significandf.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_significandl.c Remove __STDC__ conditionals from libm. 2012-01-27 17:29:45 +00:00
s_tanhl.c [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
setfpucw.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
t_sincosl.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
test-double.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-fenv-tls.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-fenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-float.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-fpucw-ieee-static.c Fix static-binary lazy FPU context allocation 2013-09-09 22:36:57 +01:00
test-fpucw-ieee.c Fix math/test-fpucw-*.c for sysdeps test-fpucw.c overrides. 2014-01-16 05:30:52 +00:00
test-fpucw-static.c Fix math/test-fpucw-*.c for sysdeps test-fpucw.c overrides. 2014-01-16 05:30:52 +00:00
test-fpucw.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-idouble.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-ifloat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-ildoubl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-ldouble.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-matherr.c Remove _BSD_SOURCE and _SVID_SOURCE. 2014-02-11 23:40:07 +00:00
test-misc.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-powl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-snan.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-tgmath-int.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-tgmath-ret.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-tgmath.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-tgmath2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tgmath.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-CMPLX.c Don't disable CMPLXL macro for __NO_LONG_DOUBLE_MATH (bug 15488). 2013-05-18 12:12:38 +00:00
tst-CMPLX2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-definitions.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_acos.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_acosf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_acosh.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_acoshf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_acoshl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_acosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_asin.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_asinf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_asinl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_atan2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_atan2f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_atan2l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_atanh.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_atanhf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_atanhl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_cosh.c Optimize libm 2011-10-12 11:27:51 -04:00
w_coshf.c Optimize libm 2011-10-12 11:27:51 -04:00
w_coshl.c Avoid overflows from long double functions using __kernel_standard. 2012-03-28 09:32:12 +00:00
w_drem.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
w_dremf.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
w_dreml.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
w_exp2.c Fix exp2 errno setting on underflow (bug 16283). 2013-12-03 20:50:51 +00:00
w_exp2f.c Fix exp2 errno setting on underflow (bug 16283). 2013-12-03 20:50:51 +00:00
w_exp2l.c Fix exp2 errno setting on underflow (bug 16283). 2013-12-03 20:50:51 +00:00
w_exp10.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_exp10f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_exp10l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_expl.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
w_fmod.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_fmodf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_fmodl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_hypot.c Optimize libm 2011-10-12 11:27:51 -04:00
w_hypotf.c Optimize libm 2011-10-12 11:27:51 -04:00
w_hypotl.c Avoid overflows from long double functions using __kernel_standard. 2012-03-28 09:32:12 +00:00
w_ilogb.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_ilogbf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_ilogbl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_j0.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_j0f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_j0l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_j1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_j1f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_j1l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_jn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_jnf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_jnl.c Avoid overflows from long double functions using __kernel_standard. 2012-03-28 09:32:12 +00:00
w_lgamma.c Optimize libm 2011-10-12 11:27:51 -04:00
w_lgamma_r.c Optimize libm 2011-10-12 11:27:51 -04:00
w_lgammaf.c Optimize libm 2011-10-12 11:27:51 -04:00
w_lgammaf_r.c Optimize libm 2011-10-12 11:27:51 -04:00
w_lgammal.c Avoid overflows from long double functions using __kernel_standard. 2012-03-28 09:32:12 +00:00
w_lgammal_r.c Optimize libm 2011-10-12 11:27:51 -04:00
w_log.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_log2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_log2f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_log2l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_log10.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_log10f.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_log10l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_logf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_logl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_pow.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
w_powf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
w_powl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
w_remainder.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_remainderf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_remainderl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_scalb.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
w_scalbf.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
w_scalbl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
w_sinh.c Optimize libm 2011-10-12 11:27:51 -04:00
w_sinhf.c Optimize libm 2011-10-12 11:27:51 -04:00
w_sinhl.c Avoid overflows from long double functions using __kernel_standard. 2012-03-28 09:32:12 +00:00
w_sqrt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_sqrtf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_sqrtl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_tgamma.c Fix tgamma errno setting on underflow (bug 6810). 2013-12-05 14:01:41 +00:00
w_tgammaf.c Fix tgamma errno setting on underflow (bug 6810). 2013-12-05 14:01:41 +00:00
w_tgammal.c Fix tgamma errno setting on underflow (bug 6810). 2013-12-05 14:01:41 +00:00

README.libm-test

README for libm-test math test suite
====================================

The libm-test math test suite tests a number of function points of
math functions in the GNU C library.  The following sections contain a
brief overview.  Please note that the test drivers and the Perl script
"gen-libm-test.pl" have some options.  A full list of options is
available with --help (for the test drivers) and -h for
"gen-libm-test.pl".


What is tested?
===============
The tests just evaluate the functions at specified points and compare
the results with precomputed values and the requirements of the ISO
C99 standard.

Besides testing the special values mandated by IEEE 754 (infinities,
NaNs and minus zero), some more or less random values are tested.

Files that are part of libm-test
================================

The main file is "libm-test.inc".  It is platform and floating point
format independent.  The file must be preprocessed by the Perl script
"gen-libm-test.pl".  The results are "libm-test.c" and a file
"libm-test-ulps.h" with platform specific deltas.

The test drivers test-double.c, test-float.c, test-ldouble.c test the
normal double, float and long double implementation of libm.  The test
drivers with an i in it (test-idouble.c, test-ifloat.c,
test-ildoubl.c) test the corresponding inline functions (where
available - otherwise they also test the real functions in libm).

"gen-libm-test.pl" needs a platform specific files with ULPs (Units of
Last Precision).  The file is called "libm-test-ulps" and lives in
platform specific sysdep directory.

How can I generate "libm-test-ulps"?
====================================

To automatically generate a new "libm-test-ulps" run "make regen-ulps".
This generates the file "math/NewUlps" in the build directory.  The file
contains the sorted results of all the tests.  You can use the "NewUlps"
file as the machine's updated "libm-test-ulps" file.  Copy "NewUlps" to
"libm-test-ulps" in the appropriate machine sysdep directory.  Verify
the changes, post your patch, and check it in after review.

To manually generate a new "libm-test-ulps" file, first remove "ULPs"
file in the current directory, then you can execute for example:
    ./testrun.sh math/test-double -u --ignore-max-ulp=yes
This generates a file "ULPs" with all double ULPs in it, ignoring any
previously calculated ULPs, and running with the newly built dynamic
loader and math library (assumes you didn't install your build).  Now
generate the ULPs for all other formats, the tests will be appending the
data to the "ULPs" file.  As final step run "gen-libm-test.pl" with the
file as input and ask to generate a pretty printed output in the file
"NewUlps":
  gen-libm-test.pl -u ULPs -n
Copy "NewUlps" to "libm-test-ulps" in the appropriate machine sysdep
directory.

Note that the test drivers have an option "-u" to output an unsorted
list of all epsilons that the functions have.  The output can be read
in directly but it's better to pretty print it first.
"gen-libm-test.pl" has an option to generate a pretty-printed and
sorted new ULPs file from the output of the test drivers.

Contents of libm-test-ulps
==========================

Since libm-test-ulps can be generated automatically, just a few notes.
The file contains lines for maximal errors of single functions, like:

Function "yn":
idouble: 6

The keywords are float, ifloat, double, idouble, ldouble and ildouble
(the prefix i stands for inline).

Adding tests to libm-test.inc
=============================

The tests are evaluated by a set of special test macros.  The macros
start with "TEST_" followed by a specification the input values, an
underscore and a specification of the output values.  As an example,
the test macro for a function with input of type FLOAT (FLOAT is
either float, double, long double) and output of type FLOAT is
"TEST_f_f".  The macro's parameter are the name of the function, the
input parameter, output parameter and optionally one exception
parameter.

The accepted parameter types are:
- "f" for FLOAT
- "b" for boolean - just tests if the output parameter evaluates to 0
  or 1 (only for output).
- "c" for complex.  This parameter needs two values, first the real,
  then the imaginary part.
- "i" for int.
- "l" for long int.
- "L" for long long int.
- "F" for the address of a FLOAT (only as input parameter)
- "I" for the address of an int (only as input parameter)