mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
5cbb58493d
Continuing the process of splitting up libm tests into more reasonably sized units, this patch splits libm-test.inc into 121 separate libm-test-<function>.inc files, one per array of test data. (There are 126 libm *_test functions, but five of those are for functions that are aliases for test purposes and so share arrays of test data.) In the present patch, the 121 files get processed separately by gen-libm-test.pl, each using only the auto-libm-test-out-<function> file that is relevant (/dev/null for functions not using auto-libm-test-* at all). This effectively eliminates the serialization on running gen-libm-test.pl. However, the resulting .c files still all get #included together, so compiling the limited number of libm tests using libm-test.inc may still act as a serialization point (the compilations still all have 40 MB of code to process). libm-test.inc doesn't actually have anything in it any more that needs gen-libm-test.pl processing, but is left as a .inc file that gets processed to produce a .c file, rather than being renamed, since the intent of this patch is as an intermediate step before libm-test.inc gets removed and tests get compiled separately for each function being tested. Tested for x86_64. * math/libm-test.inc: Move all tests of individual functions to libm-test-*.inc and #include libm-test-*.c files. (acos_test_data): Remove. (acos_test): Likewise. (acosh_test_data): Likewise. (acosh_test): Likewise. (asin_test_data): Likewise. (asin_test): Likewise. (asinh_test_data): Likewise. (asinh_test): Likewise. (atan_test_data): Likewise. (atan_test): Likewise. (atanh_test_data): Likewise. (atanh_test): Likewise. (atan2_test_data): Likewise. (atan2_test): Likewise. (cabs_test_data): Likewise. (cabs_test): Likewise. (cacos_test_data): Likewise. (cacos_test): Likewise. (cacosh_test_data): Likewise. (cacosh_test): Likewise. (canonicalize_test_data): Likewise. (canonicalize_test): Likewise. (carg_test_data): Likewise. (carg_test): Likewise. (casin_test_data): Likewise. (casin_test): Likewise. (casinh_test_data): Likewise. (casinh_test): Likewise. (catan_test_data): Likewise. (catan_test): Likewise. (catanh_test_data): Likewise. (catanh_test): Likewise. (cbrt_test_data): Likewise. (cbrt_test): Likewise. (ccos_test_data): Likewise. (ccos_test): Likewise. (ccosh_test_data): Likewise. (ccosh_test): Likewise. (ceil_test_data): Likewise. (ceil_test): Likewise. (cexp_test_data): Likewise. (cexp_test): Likewise. (cimag_test_data): Likewise. (cimag_test): Likewise. (clog_test_data): Likewise. (clog_test): Likewise. (clog10_test_data): Likewise. (clog10_test): Likewise. (conj_test_data): Likewise. (conj_test): Likewise. (copysign_test_data): Likewise. (copysign_test): Likewise. (cos_test_data): Likewise. (cos_test): Likewise. (cosh_test_data): Likewise. (cosh_test): Likewise. (cpow_test_data): Likewise. (cpow_test): Likewise. (cproj_test_data): Likewise. (cproj_test): Likewise. (creal_test_data): Likewise. (creal_test): Likewise. (csin_test_data): Likewise. (csin_test): Likewise. (csinh_test_data): Likewise. (csinh_test): Likewise. (csqrt_test_data): Likewise. (csqrt_test): Likewise. (ctan_test_data): Likewise. (ctan_test): Likewise. (ctanh_test_data): Likewise. (ctanh_test): Likewise. (erf_test_data): Likewise. (erf_test): Likewise. (erfc_test_data): Likewise. (erfc_test): Likewise. (exp_test_data): Likewise. (exp_test): Likewise. (exp10_test_data): Likewise. (exp10_test): Likewise. (pow10_test): Likewise. (exp2_test_data): Likewise. (exp2_test): Likewise. (expm1_test_data): Likewise. (expm1_test): Likewise. (fabs_test_data): Likewise. (fabs_test): Likewise. (fdim_test_data): Likewise. (fdim_test): Likewise. (floor_test_data): Likewise. (floor_test): Likewise. (fma_test_data): Likewise. (fma_test): Likewise. (fmax_test_data): Likewise. (fmax_test): Likewise. (fmaxmag_test_data): Likewise. (fmaxmag_test): Likewise. (fmin_test_data): Likewise. (fmin_test): Likewise. (fminmag_test_data): Likewise. (fminmag_test): Likewise. (fmod_test_data): Likewise. (fmod_test): Likewise. (fpclassify_test_data): Likewise. (fpclassify_test): Likewise. (frexp_test_data): Likewise. (frexp_test): Likewise. (fromfp_test_data): Likewise. (fromfp_test): Likewise. (fromfpx_test_data): Likewise. (fromfpx_test): Likewise. (getpayload_test_data): Likewise. (getpayload_test): Likewise. (hypot_test_data): Likewise. (hypot_test): Likewise. (ilogb_test_data): Likewise. (ilogb_test): Likewise. (iscanonical_test_data): Likewise. (iscanonical_test): Likewise. (iseqsig_test_data): Likewise. (iseqsig_test): Likewise. (isfinite_test_data): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test_data): Likewise. (isgreater_test): Likewise. (isgreaterequal_test_data): Likewise. (isgreaterequal_test): Likewise. (isinf_test_data): Likewise. (isinf_test): Likewise. (isless_test_data): Likewise. (isless_test): Likewise. (islessequal_test_data): Likewise. (islessequal_test): Likewise. (islessgreater_test_data): Likewise. (islessgreater_test): Likewise. (isnan_test_data): Likewise. (isnan_test): Likewise. (isnormal_test_data): Likewise. (isnormal_test): Likewise. (issignaling_test_data): Likewise. (issignaling_test): Likewise. (issubnormal_test_data): Likewise. (issubnormal_test): Likewise. (isunordered_test_data): Likewise. (isunordered_test): Likewise. (iszero_test_data): Likewise. (iszero_test): Likewise. (j0_test_data): Likewise. (j0_test): Likewise. (j1_test_data): Likewise. (j1_test): Likewise. (jn_test_data): Likewise. (jn_test): Likewise. (lgamma_test_data): Likewise. (lgamma_test): Likewise. (gamma_test): Likewise. (llogb_test_data): Likewise. (llogb_test): Likewise. (lrint_test_data): Likewise. (lrint_test): Likewise. (llrint_test_data): Likewise. (llrint_test): Likewise. (log_test_data): Likewise. (log_test): Likewise. (log10_test_data): Likewise. (log10_test): Likewise. (log1p_test_data): Likewise. (log1p_test): Likewise. (log2_test_data): Likewise. (log2_test): Likewise. (logb_test_data): Likewise. (logb_test): Likewise. (lround_test_data): Likewise. (lround_test): Likewise. (llround_test_data): Likewise. (llround_test): Likewise. (modf_test_data): Likewise. (modf_test): Likewise. (nearbyint_test_data): Likewise. (nearbyint_test): Likewise. (nextafter_test_data): Likewise. (nextafter_test): Likewise. (nextup_test_data): Likewise. (nextup_test): Likewise. (nextdown_test_data): Likewise. (nextdown_test): Likewise. (nexttoward_test_data): Likewise. (nexttoward_test): Likewise. (pow_test_data): Likewise. (pow_test): Likewise. (remainder_test_data): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remquo_test_data): Likewise. (remquo_test): Likewise. (rint_test_data): Likewise. (rint_test): Likewise. (round_test_data): Likewise. (round_test): Likewise. (roundeven_test_data): Likewise. (roundeven_test): Likewise. (scalb_test_data): Likewise. (scalb_test): Likewise. (scalbn_test_data): Likewise. (scalbn_test): Likewise. (ldexp_test): Likewise. (scalbln_test_data): Likewise. (scalbln_test): Likewise. (setpayload_test_data): Likewise. (setpayload_test): Likewise. (setpayloadsig_test_data): Likewise. (setpayloadsig_test): Likewise. (signbit_test_data): Likewise. (signbit_test): Likewise. (sin_test_data): Likewise. (sin_test): Likewise. (sincos_test_data): Likewise. (sincos_test): Likewise. (sinh_test_data): Likewise. (sinh_test): Likewise. (sqrt_test_data): Likewise. (sqrt_test): Likewise. (tan_test_data): Likewise. (tan_test): Likewise. (tanh_test_data): Likewise. (tanh_test): Likewise. (tgamma_test_data): Likewise. (tgamma_test): Likewise. (totalorder_test_data): Likewise. (totalorder_test): Likewise. (totalordermag_test_data): Likewise. (totalordermag_test): Likewise. (trunc_test_data): Likewise. (trunc_test): Likewise. (ufromfp_test_data): Likewise. (ufromfp_test): Likewise. (ufromfpx_test_data): Likewise. (ufromfpx_test): Likewise. (y0_test_data): Likewise. (y0_test): Likewise. (y1_test_data): Likewise. (y1_test): Likewise. (yn_test_data): Likewise. (yn_test): Likewise. (significand_test_data): Likewise. (significand_test): Likewise. * math/Makefile (auto-libm-test-out-files): Remove variable. (libm-test-funcs-noauto): New variable. (libm-test-funcs-all): Likewise. (libm-test-c-auto): Likewise. (libm-test-c-noauto): Likewise. (libm-tests-generated): Add $(libm-test-c-auto) and $(libm-test-c-noauto). (generated): Do not add auto-libm-test-out. (libm-test-c-auto-obj): New variable. (libm-test-c-noauto-obj): Likewise. ($(objpfx)libm-test.c): Do not generate or use auto-libm-test-out. ($(libm-test-c-noauto-obj)): New static pattern rule. ($(libm-test-c-auto-obj)): Likewise. (libm-test-incs): New variable. ($(objpfx)libm-have-vector-test.h): Depend on $(libm-test-incs) and pass it to gen-libm-have-vector-test.sh. * math/gen-libm-have-vector-test.sh: Expect list of .inc files to be passed on command line. * math/libm-test-acos.inc: New file. Content from math/libm-test.inc. * math/libm-test-acosh.inc: Likewise. * math/libm-test-asin.inc: Likewise. * math/libm-test-asinh.inc: Likewise. * math/libm-test-atan.inc: Likewise. * math/libm-test-atan2.inc: Likewise. * math/libm-test-atanh.inc: Likewise. * math/libm-test-cabs.inc: Likewise. * math/libm-test-cacos.inc: Likewise. * math/libm-test-cacosh.inc: Likewise. * math/libm-test-canonicalize.inc: Likewise. * math/libm-test-carg.inc: Likewise. * math/libm-test-casin.inc: Likewise. * math/libm-test-casinh.inc: Likewise. * math/libm-test-catan.inc: Likewise. * math/libm-test-catanh.inc: Likewise. * math/libm-test-cbrt.inc: Likewise. * math/libm-test-ccos.inc: Likewise. * math/libm-test-ccosh.inc: Likewise. * math/libm-test-ceil.inc: Likewise. * math/libm-test-cexp.inc: Likewise. * math/libm-test-cimag.inc: Likewise. * math/libm-test-clog.inc: Likewise. * math/libm-test-clog10.inc: Likewise. * math/libm-test-conj.inc: Likewise. * math/libm-test-copysign.inc: Likewise. * math/libm-test-cos.inc: Likewise. * math/libm-test-cosh.inc: Likewise. * math/libm-test-cpow.inc: Likewise. * math/libm-test-cproj.inc: Likewise. * math/libm-test-creal.inc: Likewise. * math/libm-test-csin.inc: Likewise. * math/libm-test-csinh.inc: Likewise. * math/libm-test-csqrt.inc: Likewise. * math/libm-test-ctan.inc: Likewise. * math/libm-test-ctanh.inc: Likewise. * math/libm-test-erf.inc: Likewise. * math/libm-test-erfc.inc: Likewise. * math/libm-test-exp.inc: Likewise. * math/libm-test-exp10.inc: Likewise. * math/libm-test-exp2.inc: Likewise. * math/libm-test-expm1.inc: Likewise. * math/libm-test-fabs.inc: Likewise. * math/libm-test-fdim.inc: Likewise. * math/libm-test-floor.inc: Likewise. * math/libm-test-fma.inc: Likewise. * math/libm-test-fmax.inc: Likewise. * math/libm-test-fmaxmag.inc: Likewise. * math/libm-test-fmin.inc: Likewise. * math/libm-test-fminmag.inc: Likewise. * math/libm-test-fmod.inc: Likewise. * math/libm-test-fpclassify.inc: Likewise. * math/libm-test-frexp.inc: Likewise. * math/libm-test-fromfp.inc: Likewise. * math/libm-test-fromfpx.inc: Likewise. * math/libm-test-getpayload.inc: Likewise. * math/libm-test-hypot.inc: Likewise. * math/libm-test-ilogb.inc: Likewise. * math/libm-test-iscanonical.inc: Likewise. * math/libm-test-iseqsig.inc: Likewise. * math/libm-test-isfinite.inc: Likewise. * math/libm-test-isgreater.inc: Likewise. * math/libm-test-isgreaterequal.inc: Likewise. * math/libm-test-isinf.inc: Likewise. * math/libm-test-isless.inc: Likewise. * math/libm-test-islessequal.inc: Likewise. * math/libm-test-islessgreater.inc: Likewise. * math/libm-test-isnan.inc: Likewise. * math/libm-test-isnormal.inc: Likewise. * math/libm-test-issignaling.inc: Likewise. * math/libm-test-issubnormal.inc: Likewise. * math/libm-test-isunordered.inc: Likewise. * math/libm-test-iszero.inc: Likewise. * math/libm-test-j0.inc: Likewise. * math/libm-test-j1.inc: Likewise. * math/libm-test-jn.inc: Likewise. * math/libm-test-lgamma.inc: Likewise. * math/libm-test-llogb.inc: Likewise. * math/libm-test-llrint.inc: Likewise. * math/libm-test-llround.inc: Likewise. * math/libm-test-log.inc: Likewise. * math/libm-test-log10.inc: Likewise. * math/libm-test-log1p.inc: Likewise. * math/libm-test-log2.inc: Likewise. * math/libm-test-logb.inc: Likewise. * math/libm-test-lrint.inc: Likewise. * math/libm-test-lround.inc: Likewise. * math/libm-test-modf.inc: Likewise. * math/libm-test-nearbyint.inc: Likewise. * math/libm-test-nextafter.inc: Likewise. * math/libm-test-nextdown.inc: Likewise. * math/libm-test-nexttoward.inc: Likewise. * math/libm-test-nextup.inc: Likewise. * math/libm-test-pow.inc: Likewise. * math/libm-test-remainder.inc: Likewise. * math/libm-test-remquo.inc: Likewise. * math/libm-test-rint.inc: Likewise. * math/libm-test-round.inc: Likewise. * math/libm-test-roundeven.inc: Likewise. * math/libm-test-scalb.inc: Likewise. * math/libm-test-scalbln.inc: Likewise. * math/libm-test-scalbn.inc: Likewise. * math/libm-test-setpayload.inc: Likewise. * math/libm-test-setpayloadsig.inc: Likewise. * math/libm-test-signbit.inc: Likewise. * math/libm-test-significand.inc: Likewise. * math/libm-test-sin.inc: Likewise. * math/libm-test-sincos.inc: Likewise. * math/libm-test-sinh.inc: Likewise. * math/libm-test-sqrt.inc: Likewise. * math/libm-test-tan.inc: Likewise. * math/libm-test-tanh.inc: Likewise. * math/libm-test-tgamma.inc: Likewise. * math/libm-test-totalorder.inc: Likewise. * math/libm-test-totalordermag.inc: Likewise. * math/libm-test-trunc.inc: Likewise. * math/libm-test-ufromfp.inc: Likewise. * math/libm-test-ufromfpx.inc: Likewise. * math/libm-test-y0.inc: Likewise. * math/libm-test-y1.inc: Likewise. * math/libm-test-yn.inc: Likewise. * math/README.libm-test: Update. |
||
---|---|---|
.. | ||
bits | ||
machine | ||
atest-exp2.c | ||
atest-exp.c | ||
atest-sincos.c | ||
auto-libm-test-in | ||
auto-libm-test-out-acos | ||
auto-libm-test-out-acosh | ||
auto-libm-test-out-asin | ||
auto-libm-test-out-asinh | ||
auto-libm-test-out-atan | ||
auto-libm-test-out-atan2 | ||
auto-libm-test-out-atanh | ||
auto-libm-test-out-cabs | ||
auto-libm-test-out-carg | ||
auto-libm-test-out-cbrt | ||
auto-libm-test-out-ccos | ||
auto-libm-test-out-ccosh | ||
auto-libm-test-out-cexp | ||
auto-libm-test-out-clog | ||
auto-libm-test-out-clog10 | ||
auto-libm-test-out-cos | ||
auto-libm-test-out-cosh | ||
auto-libm-test-out-cpow | ||
auto-libm-test-out-csin | ||
auto-libm-test-out-csinh | ||
auto-libm-test-out-csqrt | ||
auto-libm-test-out-ctan | ||
auto-libm-test-out-ctanh | ||
auto-libm-test-out-erf | ||
auto-libm-test-out-erfc | ||
auto-libm-test-out-exp | ||
auto-libm-test-out-exp2 | ||
auto-libm-test-out-exp10 | ||
auto-libm-test-out-expm1 | ||
auto-libm-test-out-fma | ||
auto-libm-test-out-hypot | ||
auto-libm-test-out-j0 | ||
auto-libm-test-out-j1 | ||
auto-libm-test-out-jn | ||
auto-libm-test-out-lgamma | ||
auto-libm-test-out-log | ||
auto-libm-test-out-log1p | ||
auto-libm-test-out-log2 | ||
auto-libm-test-out-log10 | ||
auto-libm-test-out-pow | ||
auto-libm-test-out-sin | ||
auto-libm-test-out-sincos | ||
auto-libm-test-out-sinh | ||
auto-libm-test-out-sqrt | ||
auto-libm-test-out-tan | ||
auto-libm-test-out-tanh | ||
auto-libm-test-out-tgamma | ||
auto-libm-test-out-y0 | ||
auto-libm-test-out-y1 | ||
auto-libm-test-out-yn | ||
basic-test.c | ||
bug-nextafter.c | ||
bug-nexttoward.c | ||
bug-tgmath1.c | ||
cabs_template.c | ||
carg_template.c | ||
cimag_template.c | ||
complex.h | ||
conj_template.c | ||
creal_template.c | ||
divtc3.c | ||
e_acoshl.c | ||
e_acosl.c | ||
e_asinl.c | ||
e_atan2l.c | ||
e_atanhl.c | ||
e_coshl.c | ||
e_exp2l.c | ||
e_exp10.c | ||
e_exp10f.c | ||
e_exp10l.c | ||
e_expl.c | ||
e_fmodl.c | ||
e_gammal_r.c | ||
e_hypotl.c | ||
e_j0l.c | ||
e_j1l.c | ||
e_jnl.c | ||
e_lgammal_r.c | ||
e_log2l.c | ||
e_log10l.c | ||
e_logl.c | ||
e_powl.c | ||
e_rem_pio2l.c | ||
e_scalb.c | ||
e_scalbf.c | ||
e_scalbl.c | ||
e_sinhl.c | ||
e_sqrtl.c | ||
fclrexcpt.c | ||
fedisblxcpt.c | ||
feenablxcpt.c | ||
fegetenv.c | ||
fegetexcept.c | ||
fegetmode.c | ||
fegetround.c | ||
feholdexcpt.c | ||
fenv.h | ||
fesetenv.c | ||
fesetexcept.c | ||
fesetmode.c | ||
fesetround.c | ||
fetestexceptflag.c | ||
feupdateenv.c | ||
fgetexcptflg.c | ||
fpu_control.c | ||
fraiseexcpt.c | ||
fromfp.h | ||
fsetexcptflg.c | ||
ftestexcept.c | ||
gen-auto-libm-tests.c | ||
gen-fromfp-tests-inputs | ||
gen-fromfp-tests.py | ||
gen-libm-have-vector-test.sh | ||
gen-libm-test.pl | ||
ieee-math.c | ||
k_casinh_template.c | ||
k_cosl.c | ||
k_sincosl.c | ||
k_sinl.c | ||
k_tanl.c | ||
lgamma-compat.h | ||
libm-test-acos.inc | ||
libm-test-acosh.inc | ||
libm-test-asin.inc | ||
libm-test-asinh.inc | ||
libm-test-atan2.inc | ||
libm-test-atan.inc | ||
libm-test-atanh.inc | ||
libm-test-cabs.inc | ||
libm-test-cacos.inc | ||
libm-test-cacosh.inc | ||
libm-test-canonicalize.inc | ||
libm-test-carg.inc | ||
libm-test-casin.inc | ||
libm-test-casinh.inc | ||
libm-test-catan.inc | ||
libm-test-catanh.inc | ||
libm-test-cbrt.inc | ||
libm-test-ccos.inc | ||
libm-test-ccosh.inc | ||
libm-test-ceil.inc | ||
libm-test-cexp.inc | ||
libm-test-cimag.inc | ||
libm-test-clog10.inc | ||
libm-test-clog.inc | ||
libm-test-conj.inc | ||
libm-test-copysign.inc | ||
libm-test-cos.inc | ||
libm-test-cosh.inc | ||
libm-test-cpow.inc | ||
libm-test-cproj.inc | ||
libm-test-creal.inc | ||
libm-test-csin.inc | ||
libm-test-csinh.inc | ||
libm-test-csqrt.inc | ||
libm-test-ctan.inc | ||
libm-test-ctanh.inc | ||
libm-test-driver.c | ||
libm-test-erf.inc | ||
libm-test-erfc.inc | ||
libm-test-exp2.inc | ||
libm-test-exp10.inc | ||
libm-test-exp.inc | ||
libm-test-expm1.inc | ||
libm-test-fabs.inc | ||
libm-test-fdim.inc | ||
libm-test-floor.inc | ||
libm-test-fma.inc | ||
libm-test-fmax.inc | ||
libm-test-fmaxmag.inc | ||
libm-test-fmin.inc | ||
libm-test-fminmag.inc | ||
libm-test-fmod.inc | ||
libm-test-fpclassify.inc | ||
libm-test-frexp.inc | ||
libm-test-fromfp.inc | ||
libm-test-fromfpx.inc | ||
libm-test-getpayload.inc | ||
libm-test-hypot.inc | ||
libm-test-ilogb.inc | ||
libm-test-iscanonical.inc | ||
libm-test-iseqsig.inc | ||
libm-test-isfinite.inc | ||
libm-test-isgreater.inc | ||
libm-test-isgreaterequal.inc | ||
libm-test-isinf.inc | ||
libm-test-isless.inc | ||
libm-test-islessequal.inc | ||
libm-test-islessgreater.inc | ||
libm-test-isnan.inc | ||
libm-test-isnormal.inc | ||
libm-test-issignaling.inc | ||
libm-test-issubnormal.inc | ||
libm-test-isunordered.inc | ||
libm-test-iszero.inc | ||
libm-test-j0.inc | ||
libm-test-j1.inc | ||
libm-test-jn.inc | ||
libm-test-lgamma.inc | ||
libm-test-llogb.inc | ||
libm-test-llrint.inc | ||
libm-test-llround.inc | ||
libm-test-log1p.inc | ||
libm-test-log2.inc | ||
libm-test-log10.inc | ||
libm-test-log.inc | ||
libm-test-logb.inc | ||
libm-test-lrint.inc | ||
libm-test-lround.inc | ||
libm-test-modf.inc | ||
libm-test-nearbyint.inc | ||
libm-test-nextafter.inc | ||
libm-test-nextdown.inc | ||
libm-test-nexttoward.inc | ||
libm-test-nextup.inc | ||
libm-test-pow.inc | ||
libm-test-remainder.inc | ||
libm-test-remquo.inc | ||
libm-test-rint.inc | ||
libm-test-round.inc | ||
libm-test-roundeven.inc | ||
libm-test-scalb.inc | ||
libm-test-scalbln.inc | ||
libm-test-scalbn.inc | ||
libm-test-setpayload.inc | ||
libm-test-setpayloadsig.inc | ||
libm-test-signbit.inc | ||
libm-test-significand.inc | ||
libm-test-sin.inc | ||
libm-test-sincos.inc | ||
libm-test-sinh.inc | ||
libm-test-sqrt.inc | ||
libm-test-tan.inc | ||
libm-test-tanh.inc | ||
libm-test-tgamma.inc | ||
libm-test-totalorder.inc | ||
libm-test-totalordermag.inc | ||
libm-test-trunc.inc | ||
libm-test-ufromfp.inc | ||
libm-test-ufromfpx.inc | ||
libm-test-y0.inc | ||
libm-test-y1.inc | ||
libm-test-yn.inc | ||
libm-test.inc | ||
Makefile | ||
math.h | ||
mul_split.h | ||
mul_splitl.h | ||
multc3.c | ||
README.libm-test | ||
s_asinhl.c | ||
s_atanl.c | ||
s_cacos_template.c | ||
s_cacosh_template.c | ||
s_canonicalize_template.c | ||
s_casin_template.c | ||
s_casinh_template.c | ||
s_catan_template.c | ||
s_catanh_template.c | ||
s_cbrtl.c | ||
s_ccos_template.c | ||
s_ccosh_template.c | ||
s_cexp_template.c | ||
s_clog10_template.c | ||
s_clog_template.c | ||
s_cpow_template.c | ||
s_cproj_template.c | ||
s_csin_template.c | ||
s_csinh_template.c | ||
s_csqrt_template.c | ||
s_ctan_template.c | ||
s_ctanh_template.c | ||
s_erfl.c | ||
s_expm1l.c | ||
s_fdim_template.c | ||
s_fma.c | ||
s_fmaf.c | ||
s_fmal.c | ||
s_fmax_template.c | ||
s_fmaxmag_template.c | ||
s_fmin_template.c | ||
s_fminmag_template.c | ||
s_iscanonicall.c | ||
s_iseqsig_template.c | ||
s_ldexp_template.c | ||
s_log1pl.c | ||
s_nan_template.c | ||
s_nextafter.c | ||
s_nextdown_template.c | ||
s_nexttowardf.c | ||
s_nexttowardl.c | ||
s_significand.c | ||
s_significandf.c | ||
s_significandl.c | ||
s_tanhl.c | ||
setfpucw.c | ||
t_sincosl.c | ||
test-double-finite.c | ||
test-double-vlen2.h | ||
test-double-vlen4.h | ||
test-double-vlen8.h | ||
test-double.c | ||
test-double.h | ||
test-fe-snans-always-signal.c | ||
test-femode-traps.c | ||
test-femode.c | ||
test-fenv-clear-main.c | ||
test-fenv-clear.c | ||
test-fenv-preserve.c | ||
test-fenv-return.c | ||
test-fenv-tls.c | ||
test-fenv.c | ||
test-fenvinline.c | ||
test-fesetexcept-traps.c | ||
test-fesetexcept.c | ||
test-fetestexceptflag.c | ||
test-fexcept-traps.c | ||
test-fexcept.c | ||
test-float-finite.c | ||
test-float-vlen4.h | ||
test-float-vlen8.h | ||
test-float-vlen16.h | ||
test-float.c | ||
test-float.h | ||
test-flt-eval-method.c | ||
test-fp-ilogb-constants.c | ||
test-fp-llogb-constants.c | ||
test-fpucw-ieee-static.c | ||
test-fpucw-ieee.c | ||
test-fpucw-static.c | ||
test-fpucw.c | ||
test-idouble.c | ||
test-ifloat.c | ||
test-ildouble.c | ||
test-iseqsig-excess-precision.c | ||
test-iszero-excess-precision.c | ||
test-ldouble-finite.c | ||
test-ldouble.c | ||
test-ldouble.h | ||
test-math-errno.h | ||
test-math-finite.h | ||
test-math-inline.h | ||
test-math-isinff.cc | ||
test-math-iszero.cc | ||
test-math-no-finite.h | ||
test-math-no-inline.h | ||
test-math-scalar.h | ||
test-math-vector.h | ||
test-matherr.c | ||
test-misc.c | ||
test-nan-overflow.c | ||
test-nan-payload.c | ||
test-nearbyint-except-2.c | ||
test-nearbyint-except.c | ||
test-powl.c | ||
test-signgam-finite-c11.c | ||
test-signgam-finite-c99.c | ||
test-signgam-finite.c | ||
test-signgam-main.c | ||
test-signgam-uchar-init-static.c | ||
test-signgam-uchar-init.c | ||
test-signgam-uchar-static.c | ||
test-signgam-uchar.c | ||
test-signgam-uint-init-static.c | ||
test-signgam-uint-init.c | ||
test-signgam-uint-static.c | ||
test-signgam-uint.c | ||
test-signgam-ullong-init-static.c | ||
test-signgam-ullong-init.c | ||
test-signgam-ullong-static.c | ||
test-signgam-ullong.c | ||
test-snan.c | ||
test-tgmath2.c | ||
test-tgmath-int.c | ||
test-tgmath-ret.c | ||
test-tgmath.c | ||
tgmath.h | ||
tst-CMPLX2.c | ||
tst-CMPLX.c | ||
tst-definitions.c | ||
Versions | ||
w_acos_compat.c | ||
w_acosf_compat.c | ||
w_acosh_compat.c | ||
w_acoshf_compat.c | ||
w_acoshl_compat.c | ||
w_acosl_compat.c | ||
w_asin_compat.c | ||
w_asinf_compat.c | ||
w_asinl_compat.c | ||
w_atan2_compat.c | ||
w_atan2f_compat.c | ||
w_atan2l_compat.c | ||
w_atanh_compat.c | ||
w_atanhf_compat.c | ||
w_atanhl_compat.c | ||
w_cosh_compat.c | ||
w_coshf_compat.c | ||
w_coshl_compat.c | ||
w_exp2_compat.c | ||
w_exp2f_compat.c | ||
w_exp2l_compat.c | ||
w_exp10_compat.c | ||
w_exp10f_compat.c | ||
w_exp10l_compat.c | ||
w_expl.c | ||
w_fmod_compat.c | ||
w_fmodf_compat.c | ||
w_fmodl_compat.c | ||
w_hypot_compat.c | ||
w_hypotf_compat.c | ||
w_hypotl_compat.c | ||
w_ilogb_template.c | ||
w_j0_compat.c | ||
w_j0f_compat.c | ||
w_j0l_compat.c | ||
w_j1_compat.c | ||
w_j1f_compat.c | ||
w_j1l_compat.c | ||
w_jn_compat.c | ||
w_jnf_compat.c | ||
w_jnl_compat.c | ||
w_lgamma_compat.c | ||
w_lgamma_compatf.c | ||
w_lgamma_compatl.c | ||
w_lgamma_main.c | ||
w_lgamma_r.c | ||
w_lgamma.c | ||
w_lgammaf_main.c | ||
w_lgammaf_r.c | ||
w_lgammaf.c | ||
w_lgammal_main.c | ||
w_lgammal_r.c | ||
w_lgammal.c | ||
w_llogb_template.c | ||
w_log1p_template.c | ||
w_log2_compat.c | ||
w_log2f_compat.c | ||
w_log2l_compat.c | ||
w_log10_compat.c | ||
w_log10f_compat.c | ||
w_log10l_compat.c | ||
w_log_compat.c | ||
w_logf_compat.c | ||
w_logl_compat.c | ||
w_pow_compat.c | ||
w_powf_compat.c | ||
w_powl_compat.c | ||
w_remainder_compat.c | ||
w_remainderf_compat.c | ||
w_remainderl_compat.c | ||
w_scalb_compat.c | ||
w_scalbf_compat.c | ||
w_scalbl_compat.c | ||
w_scalbln_template.c | ||
w_sinh_compat.c | ||
w_sinhf_compat.c | ||
w_sinhl_compat.c | ||
w_sqrt_compat.c | ||
w_sqrtf_compat.c | ||
w_sqrtl_compat.c | ||
w_tgamma_compat.c | ||
w_tgammaf_compat.c | ||
w_tgammal_compat.c |
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 files are "libm-test-<func>.inc". They are independent of the target platform and the specific real floating type and format and contain placeholder test "templates" for math functions defined in libm. These files, along with generated files named "auto-libm-test-out-<func>", are preprocessed by the Perl script "gen-libm-test.pl" to expand the templates and produce a set of test cases for each math function that are specific to the target platform but still independent of the real floating type. The results of the processing are "libm-test-<func>.c" and a file "libm-test-ulps.h" with platform specific deltas by which the actual math function results may deviate from the expected results and still be considered correct. The test drivers "test-double.c", "test-float.c", and "test-ldouble.c" test the normal double, float and long double implementation of libm. The test drivers with an 'i' in their name ("test-idouble.c", "test-ifloat.c", and "test-ildoubl.c") test the corresponding inline functions (where available - otherwise they also test the real functions in libm). Each driver selects the desired real floating type to exercise the math functions to test with (float, double, or long double) by defining a small set of macros just before including the generic "libm-test.c" file. Each driver also either defines or undefines the __NO_MATH_INLINES macro just before including "libm-test.c" to select either the real or inline functions, respectively. Each driver is compiled into a single executable test program with the corresponding name. As mentioned above, the "gen-libm-test.pl" script looks for a file named "libm-test-ulps" in the platform specific sysdep directory (or its fpu or nofpu subdirectory) and for each variant (real floating type and rounding mode) of every tested function reads from it the maximum difference expressed as Units of Least Precision (ULP) the actual result of the function may deviate from the expected result before it's considered incorrect. The "auto-libm-test-out-<func>" files contain sets of test cases to exercise, the conditions under which to exercise each, and the expected results. The files are generated by the "gen-auto-libm-tests" program from the "auto-libm-test-in" file. See the comments in gen-auto-libm-tests.c for details about the content and format of the -in and -out files. 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 NewUlps 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-<func>.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 - "j" for long double. - "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. - "u" for unsigned int. - "M" for intmax_t. - "U" for uintmax_t. - "p" for an argument (described in the previous character) passed through a pointer rather than directly. - "F" for the address of a FLOAT (only as input parameter) - "I" for the address of an int (only as input parameter) - "1" for an additional output (either output through a pointer passed as an argument, or to a global variable such as signgam). How to read the test output =========================== Running each test on its own at the default level of verbosity will print on stdout a line describing the implementation of math functions exercised by the test (float, double, or long double), along with whether the inline set has been selected, regardless of whether or not any inline functions actually exist. This is then followed by the details of test failures (if any). The output concludes by a summary listing the number of test cases exercised and the number of test failures uncovered. For each test failure (and for each test case at higher levels of verbosity), the output contains the name of the function under test and its arguments or conditions that triggered the failure. Note that the name of the function in the output need not correspond exactly to the name of the math function actually invoked. For example, the output will refer to the "acos" function even if the actual function under test is acosf (for the float version) or acosl (for the long double version). Also note that the function arguments may be shown in either the decimal or the hexadecimal floating point format which may or may not correspond to the format used in the auto-libm-test-in file. Besides the name of the function, for each test failure the output contains the actual and expected results and the difference between the two, printed in both the decimal and hexadecimal floating point format, and the ULP and maximum ULP for the test case.