You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Joseph Myers 1a4ac776eb Remove inaccurate x86 cexp implementations (bug 13883). 14 years ago
..
bits Replace FSF snail mail address with URLs. 14 years ago
machine Update. 27 years ago
Makefile Remove distribute variable from Makefiles 14 years ago
README.libm-test Update. 22 years ago
Versions Optimize exp 15 years ago
atest-exp.c Replace FSF snail mail address with URLs. 14 years ago
atest-exp2.c Replace FSF snail mail address with URLs. 14 years ago
atest-sincos.c Replace FSF snail mail address with URLs. 14 years ago
basic-test.c Replace FSF snail mail address with URLs. 14 years ago
bug-nextafter.c [BZ #3306] 19 years ago
bug-nexttoward.c [BZ #3306] 19 years ago
bug-tgmath1.c Update. 22 years ago
cabs.c Replace FSF snail mail address with URLs. 14 years ago
cabsf.c Replace FSF snail mail address with URLs. 14 years ago
cabsl.c Replace FSF snail mail address with URLs. 14 years ago
carg.c Replace FSF snail mail address with URLs. 14 years ago
cargf.c Replace FSF snail mail address with URLs. 14 years ago
cargl.c Replace FSF snail mail address with URLs. 14 years ago
cimag.c Replace FSF snail mail address with URLs. 14 years ago
cimagf.c Replace FSF snail mail address with URLs. 14 years ago
cimagl.c Replace FSF snail mail address with URLs. 14 years ago
complex.h Replace FSF snail mail address with URLs. 14 years ago
conj.c Replace FSF snail mail address with URLs. 14 years ago
conjf.c Replace FSF snail mail address with URLs. 14 years ago
conjl.c Replace FSF snail mail address with URLs. 14 years ago
creal.c Replace FSF snail mail address with URLs. 14 years ago
crealf.c Replace FSF snail mail address with URLs. 14 years ago
creall.c Replace FSF snail mail address with URLs. 14 years ago
divtc3.c Replace FSF snail mail address with URLs. 14 years ago
e_acoshl.c Optimize libm 15 years ago
e_acosl.c Optimize libm 15 years ago
e_asinl.c Optimize libm 15 years ago
e_atan2l.c Optimize libm 15 years ago
e_atanhl.c Optimize libm 15 years ago
e_coshl.c Optimize libm 15 years ago
e_exp2l.c Optimize libm 15 years ago
e_exp10.c Replace FSF snail mail address with URLs. 14 years ago
e_exp10f.c Replace FSF snail mail address with URLs. 14 years ago
e_exp10l.c Replace FSF snail mail address with URLs. 14 years ago
e_expl.c Optimize exp 15 years ago
e_fmodl.c Optimize libm 15 years ago
e_gammal_r.c Optimize libm 15 years ago
e_hypotl.c Optimize libm 15 years ago
e_j0l.c Optimize libm 15 years ago
e_j1l.c Optimize libm 15 years ago
e_jnl.c Optimize libm 15 years ago
e_lgammal_r.c Optimize libm 15 years ago
e_log2l.c Optimize libm 15 years ago
e_log10l.c Optimize libm 15 years ago
e_logl.c Optimize libm 15 years ago
e_powl.c Optimize libm 15 years ago
e_rem_pio2l.c Use private math_private.h in files in math/ 15 years ago
e_scalb.c Replace FSF snail mail address with URLs. 14 years ago
e_scalbf.c Replace FSF snail mail address with URLs. 14 years ago
e_scalbl.c Replace FSF snail mail address with URLs. 14 years ago
e_sinhl.c Optimize libm 15 years ago
e_sqrtl.c Optimize libm 15 years ago
fclrexcpt.c Replace FSF snail mail address with URLs. 14 years ago
fedisblxcpt.c Replace FSF snail mail address with URLs. 14 years ago
feenablxcpt.c Replace FSF snail mail address with URLs. 14 years ago
fegetenv.c Replace FSF snail mail address with URLs. 14 years ago
fegetexcept.c Replace FSF snail mail address with URLs. 14 years ago
fegetround.c Replace FSF snail mail address with URLs. 14 years ago
feholdexcpt.c Replace FSF snail mail address with URLs. 14 years ago
fenv.h Replace FSF snail mail address with URLs. 14 years ago
fesetenv.c Replace FSF snail mail address with URLs. 14 years ago
fesetround.c Replace FSF snail mail address with URLs. 14 years ago
feupdateenv.c Replace FSF snail mail address with URLs. 14 years ago
fgetexcptflg.c Replace FSF snail mail address with URLs. 14 years ago
fpu_control.c Replace FSF snail mail address with URLs. 14 years ago
fraiseexcpt.c Replace FSF snail mail address with URLs. 14 years ago
fsetexcptflg.c Replace FSF snail mail address with URLs. 14 years ago
ftestexcept.c Replace FSF snail mail address with URLs. 14 years ago
gen-libm-test.pl Test for overflow exceptions in libm-test.inc. 14 years ago
ieee-math.c * hurd/hurdinit.c (map0): Remove [!PIC] conditional. 30 years ago
k_cosl.c Use private math_private.h in files in math/ 15 years ago
k_rem_pio2l.c Moved to csu/errno-loc.c. 21 years ago
k_sincosl.c Moved to csu/errno-loc.c. 21 years ago
k_sinl.c Use private math_private.h in files in math/ 15 years ago
k_tanl.c Use private math_private.h in files in math/ 15 years ago
libm-test.inc Remove inaccurate x86 cexp implementations (bug 13883). 14 years ago
math.h Replace FSF snail mail address with URLs. 14 years ago
multc3.c Replace FSF snail mail address with URLs. 14 years ago
s_asinhl.c Moved to csu/errno-loc.c. 21 years ago
s_atanl.c Moved to csu/errno-loc.c. 21 years ago
s_cacos.c Replace FSF snail mail address with URLs. 14 years ago
s_cacosf.c Replace FSF snail mail address with URLs. 14 years ago
s_cacosh.c Fix signs of zeros from casinh, cacosh etc. (bug 10716). 14 years ago
s_cacoshf.c Fix signs of zeros from casinh, cacosh etc. (bug 10716). 14 years ago
s_cacoshl.c Fix signs of zeros from casinh, cacosh etc. (bug 10716). 14 years ago
s_cacosl.c Replace FSF snail mail address with URLs. 14 years ago
s_casin.c Replace FSF snail mail address with URLs. 14 years ago
s_casinf.c Replace FSF snail mail address with URLs. 14 years ago
s_casinh.c Fix signs of zeros from casinh, cacosh etc. (bug 10716). 14 years ago
s_casinhf.c Fix signs of zeros from casinh, cacosh etc. (bug 10716). 14 years ago
s_casinhl.c Fix signs of zeros from casinh, cacosh etc. (bug 10716). 14 years ago
s_casinl.c Replace FSF snail mail address with URLs. 14 years ago
s_catan.c Replace FSF snail mail address with URLs. 14 years ago
s_catanf.c Replace FSF snail mail address with URLs. 14 years ago
s_catanh.c Replace FSF snail mail address with URLs. 14 years ago
s_catanhf.c Replace FSF snail mail address with URLs. 14 years ago
s_catanhl.c Replace FSF snail mail address with URLs. 14 years ago
s_catanl.c Replace FSF snail mail address with URLs. 14 years ago
s_cbrtl.c Moved to csu/errno-loc.c. 21 years ago
s_ccos.c Replace FSF snail mail address with URLs. 14 years ago
s_ccosf.c Replace FSF snail mail address with URLs. 14 years ago
s_ccosh.c Replace FSF snail mail address with URLs. 14 years ago
s_ccoshf.c Replace FSF snail mail address with URLs. 14 years ago
s_ccoshl.c Replace FSF snail mail address with URLs. 14 years ago
s_ccosl.c Replace FSF snail mail address with URLs. 14 years ago
s_cexp.c Replace FSF snail mail address with URLs. 14 years ago
s_cexpf.c Replace FSF snail mail address with URLs. 14 years ago
s_cexpl.c Replace FSF snail mail address with URLs. 14 years ago
s_clog.c Fix clog overflow/underflow (bug 13629). 14 years ago
s_clog10.c Fix clog overflow/underflow (bug 13629). 14 years ago
s_clog10f.c Fix clog overflow/underflow (bug 13629). 14 years ago
s_clog10l.c Fix clog overflow/underflow (bug 13629). 14 years ago
s_clogf.c Fix clog overflow/underflow (bug 13629). 14 years ago
s_clogl.c Fix clog overflow/underflow (bug 13629). 14 years ago
s_cpow.c Replace FSF snail mail address with URLs. 14 years ago
s_cpowf.c Replace FSF snail mail address with URLs. 14 years ago
s_cpowl.c Replace FSF snail mail address with URLs. 14 years ago
s_cproj.c Replace FSF snail mail address with URLs. 14 years ago
s_cprojf.c Replace FSF snail mail address with URLs. 14 years ago
s_cprojl.c Replace FSF snail mail address with URLs. 14 years ago
s_csin.c Replace FSF snail mail address with URLs. 14 years ago
s_csinf.c Replace FSF snail mail address with URLs. 14 years ago
s_csinh.c Replace FSF snail mail address with URLs. 14 years ago
s_csinhf.c Replace FSF snail mail address with URLs. 14 years ago
s_csinhl.c Replace FSF snail mail address with URLs. 14 years ago
s_csinl.c Replace FSF snail mail address with URLs. 14 years ago
s_csqrt.c Fix csqrt overflow/underflow (bug 13841). 14 years ago
s_csqrtf.c Fix csqrt overflow/underflow (bug 13841). 14 years ago
s_csqrtl.c Fix csqrt overflow/underflow (bug 13841). 14 years ago
s_ctan.c Replace FSF snail mail address with URLs. 14 years ago
s_ctanf.c Replace FSF snail mail address with URLs. 14 years ago
s_ctanh.c Replace FSF snail mail address with URLs. 14 years ago
s_ctanhf.c Replace FSF snail mail address with URLs. 14 years ago
s_ctanhl.c Replace FSF snail mail address with URLs. 14 years ago
s_ctanl.c Replace FSF snail mail address with URLs. 14 years ago
s_erfl.c Moved to csu/errno-loc.c. 21 years ago
s_expm1l.c Moved to csu/errno-loc.c. 21 years ago
s_fdim.c Replace FSF snail mail address with URLs. 14 years ago
s_fdimf.c Replace FSF snail mail address with URLs. 14 years ago
s_fdiml.c Replace FSF snail mail address with URLs. 14 years ago
s_fma.c Replace FSF snail mail address with URLs. 14 years ago
s_fmaf.c Replace FSF snail mail address with URLs. 14 years ago
s_fmal.c Replace FSF snail mail address with URLs. 14 years ago
s_fmax.c Replace FSF snail mail address with URLs. 14 years ago
s_fmaxf.c Replace FSF snail mail address with URLs. 14 years ago
s_fmaxl.c Replace FSF snail mail address with URLs. 14 years ago
s_fmin.c Replace FSF snail mail address with URLs. 14 years ago
s_fminf.c Replace FSF snail mail address with URLs. 14 years ago
s_fminl.c Replace FSF snail mail address with URLs. 14 years ago
s_ldexp.c Remove __STDC__ conditionals from libm. 14 years ago
s_ldexpf.c Remove __STDC__ conditionals from libm. 14 years ago
s_ldexpl.c Remove __STDC__ conditionals from libm. 14 years ago
s_log1pl.c Moved to csu/errno-loc.c. 21 years ago
s_nan.c Replace FSF snail mail address with URLs. 14 years ago
s_nanf.c Replace FSF snail mail address with URLs. 14 years ago
s_nanl.c Replace FSF snail mail address with URLs. 14 years ago
s_nextafter.c Remove __STDC__ conditionals from libm. 14 years ago
s_nexttowardf.c Remove __STDC__ conditionals from libm. 14 years ago
s_nexttowardl.c Moved to csu/errno-loc.c. 21 years ago
s_significand.c Remove __STDC__ conditionals from libm. 14 years ago
s_significandf.c Remove __STDC__ conditionals from libm. 14 years ago
s_significandl.c Remove __STDC__ conditionals from libm. 14 years ago
s_tanhl.c Moved to csu/errno-loc.c. 21 years ago
setfpucw.c Replace FSF snail mail address with URLs. 14 years ago
t_sincosl.c Moved to csu/errno-loc.c. 21 years ago
test-double.c Replace FSF snail mail address with URLs. 14 years ago
test-fenv.c Replace FSF snail mail address with URLs. 14 years ago
test-float.c Replace FSF snail mail address with URLs. 14 years ago
test-fpucw.c Replace FSF snail mail address with URLs. 14 years ago
test-idouble.c Replace FSF snail mail address with URLs. 14 years ago
test-ifloat.c Replace FSF snail mail address with URLs. 14 years ago
test-ildoubl.c Replace FSF snail mail address with URLs. 14 years ago
test-ldouble.c Replace FSF snail mail address with URLs. 14 years ago
test-matherr.c Update. 29 years ago
test-misc.c Replace FSF snail mail address with URLs. 14 years ago
test-powl.c Replace FSF snail mail address with URLs. 14 years ago
test-tgmath-int.c Replace FSF snail mail address with URLs. 14 years ago
test-tgmath-ret.c Replace FSF snail mail address with URLs. 14 years ago
test-tgmath.c Replace FSF snail mail address with URLs. 14 years ago
test-tgmath2.c Replace FSF snail mail address with URLs. 14 years ago
tgmath.h Replace FSF snail mail address with URLs. 14 years ago
tst-CMPLX.c Include <stdio.h> in math/tst-CMPLX.c. 14 years ago
tst-CMPLX2.c Replace FSF snail mail address with URLs. 14 years ago
tst-definitions.c Replace FSF snail mail address with URLs. 14 years ago
w_acos.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_acosf.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_acosh.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_acoshf.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_acoshl.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_acosl.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_asin.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_asinf.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_asinl.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_atan2.c Replace FSF snail mail address with URLs. 14 years ago
w_atan2f.c Replace FSF snail mail address with URLs. 14 years ago
w_atan2l.c Replace FSF snail mail address with URLs. 14 years ago
w_atanh.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_atanhf.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_atanhl.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_cosh.c Optimize libm 15 years ago
w_coshf.c Optimize libm 15 years ago
w_coshl.c Optimize libm 15 years ago
w_drem.c Moved to csu/errno-loc.c. 21 years ago
w_dremf.c Use private math_private.h in files in math/ 15 years ago
w_dreml.c Moved to csu/errno-loc.c. 21 years ago
w_exp2.c Fix missing exp2 overflow exception (bug 13871). 14 years ago
w_exp2f.c Fix missing exp2 overflow exception (bug 13871). 14 years ago
w_exp2l.c Fix missing exp2 overflow exception (bug 13871). 14 years ago
w_exp10.c Replace FSF snail mail address with URLs. 14 years ago
w_exp10f.c Replace FSF snail mail address with URLs. 14 years ago
w_exp10l.c Replace FSF snail mail address with URLs. 14 years ago
w_expl.c Moved to csu/errno-loc.c. 21 years ago
w_fmod.c Replace FSF snail mail address with URLs. 14 years ago
w_fmodf.c Replace FSF snail mail address with URLs. 14 years ago
w_fmodl.c Replace FSF snail mail address with URLs. 14 years ago
w_hypot.c Optimize libm 15 years ago
w_hypotf.c Optimize libm 15 years ago
w_hypotl.c Optimize libm 15 years ago
w_j0.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_j0f.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_j0l.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_j1.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_j1f.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_j1l.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_jn.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_jnf.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_jnl.c Disable Bessel function TLOSS errors in POSIX mode. 14 years ago
w_lgamma.c Optimize libm 15 years ago
w_lgamma_r.c Optimize libm 15 years ago
w_lgammaf.c Optimize libm 15 years ago
w_lgammaf_r.c Optimize libm 15 years ago
w_lgammal.c Optimize libm 15 years ago
w_lgammal_r.c Optimize libm 15 years ago
w_log.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_log2.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_log2f.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_log2l.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_log10.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_log10f.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_log10l.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_logf.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_logl.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_pow.c Replace FSF snail mail address with URLs. 14 years ago
w_powf.c Replace FSF snail mail address with URLs. 14 years ago
w_powl.c Replace FSF snail mail address with URLs. 14 years ago
w_remainder.c Replace FSF snail mail address with URLs. 14 years ago
w_remainderf.c Replace FSF snail mail address with URLs. 14 years ago
w_remainderl.c Replace FSF snail mail address with URLs. 14 years ago
w_scalb.c Replace FSF snail mail address with URLs. 14 years ago
w_scalbf.c Replace FSF snail mail address with URLs. 14 years ago
w_scalbl.c Replace FSF snail mail address with URLs. 14 years ago
w_sinh.c Optimize libm 15 years ago
w_sinhf.c Optimize libm 15 years ago
w_sinhl.c Optimize libm 15 years ago
w_sqrt.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_sqrtf.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_sqrtl.c Use non-signaling floating-point comparisons in math functions. 14 years ago
w_tgamma.c Optimize libm 15 years ago
w_tgammaf.c Optimize libm 15 years ago
w_tgammal.c Optimize libm 15 years ago

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"?
====================================

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.

To generate a new "libm-test-ulps" file, first remove "ULPs" file in the
current directory, then you can execute for example:
test-double -u --ignore-max-ulp=yes
This generates a file "ULPs" with all double ULPs in it, ignoring any
previous calculated ULPs.
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

Now you can rename "NewUlps" to "libm-test-ulps" and move it into
sysdeps.

Contents of libm-test-ulps
==========================
Since libm-test-ulps can be generated automatically, just a few
notes. The file contains lines for single tests, like:
Test "cos (pi/2) == 0":
float: 1

and lines for maximal errors of single functions, like:
Function "yn":
idouble: 6.0000

The keywords are float, ifloat, double, idouble, ldouble and ildouble
(the prefix i stands for inline). You can also specify known
failures, e.g.:

Test "cos (pi/2) == 0":
float: 1
float: fail

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)

Some functions need special handling. For example gamma sets the
global variable signgam and frexp takes an argument to &int. This
special treatment is coded in "gen-libm-test.pl" and used while
parsing "libm-test.inc".