"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "math/README.libm-test" between
glibc-2.31.tar.xz and glibc-2.32.tar.xz

About: The GNU C Library ("system calls" and other basic facilities such as open, malloc, printf, exit ...).

README.libm-test  (glibc-2.31.tar.xz):README.libm-test  (glibc-2.32.tar.xz)
skipping to change at line 37 skipping to change at line 37
"auto-libm-test-out-<func>", are preprocessed by the Python script "auto-libm-test-out-<func>", are preprocessed by the Python script
"gen-libm-test.py" to expand the templates and produce a set of test "gen-libm-test.py" to expand the templates and produce a set of test
cases for each math function that are specific to the target platform cases for each math function that are specific to the target platform
but still independent of the real floating type. The results of the 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 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 platform specific deltas by which the actual math function results may
deviate from the expected results and still be considered correct. deviate from the expected results and still be considered correct.
The test drivers "test-double-<func>.c", "test-float-<func>.c", and The test drivers "test-double-<func>.c", "test-float-<func>.c", and
"test-ldouble-<func>.c", generated by the Makefile, test the normal "test-ldouble-<func>.c", generated by the Makefile, test the normal
double, float and long double implementation of libm. The test double, float and long double implementation of libm. Each driver
drivers with an 'i' in their name ("test-idouble-<func>.c", selects the desired real floating type to exercise the math functions
"test-ifloat-<func>.c", and "test-ildoubl-<func>.c") test the to test with (float, double, or long double) by defining a small set
corresponding inline functions (where available - otherwise they also of macros just before including the generic "libm-test.c" file. Each
test the real functions in libm). Each driver selects the desired driver is compiled into a single executable test program with the
real floating type to exercise the math functions to test with (float, corresponding name.
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-<func>.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.py" script looks for a file As mentioned above, the "gen-libm-test.py" script looks for a file
named "libm-test-ulps" in the platform specific sysdep directory (or named "libm-test-ulps" in the platform specific sysdep directory (or
its fpu or nofpu subdirectory) and for each variant (real floating its fpu or nofpu subdirectory) and for each variant (real floating
type and rounding mode) of every tested function reads from it the type and rounding mode) of every tested function reads from it the
maximum difference expressed as Units of Least Precision (ULP) the maximum difference expressed as Units of Least Precision (ULP) the
actual result of the function may deviate from the expected result actual result of the function may deviate from the expected result
before it's considered incorrect. before it's considered incorrect.
The "auto-libm-test-out-<func>" files contain sets of test cases to The "auto-libm-test-out-<func>" files contain sets of test cases to
skipping to change at line 102 skipping to change at line 96
"gen-libm-test.py" has an option to generate a pretty-printed and "gen-libm-test.py" has an option to generate a pretty-printed and
sorted new ULPs file from the output of the test drivers. sorted new ULPs file from the output of the test drivers.
Contents of libm-test-ulps Contents of libm-test-ulps
========================== ==========================
Since libm-test-ulps can be generated automatically, just a few notes. Since libm-test-ulps can be generated automatically, just a few notes.
The file contains lines for maximal errors of single functions, like: The file contains lines for maximal errors of single functions, like:
Function "yn": Function "yn":
idouble: 6 double: 6
The keywords are float, ifloat, double, idouble, ldouble and ildouble The keywords are float, double, and ldouble.
(the prefix i stands for inline).
Adding tests to libm-test-<func>.inc Adding tests to libm-test-<func>.inc
==================================== ====================================
The tests are evaluated by a set of special test macros. The macros The tests are evaluated by a set of special test macros. The macros
start with "TEST_" followed by a specification the input values, an start with "TEST_" followed by a specification the input values, an
underscore and a specification of the output values. As an example, underscore and a specification of the output values. As an example,
the test macro for a function with input of type FLOAT (FLOAT is the test macro for a function with input of type FLOAT (FLOAT is
either float, double, long double) and output of type 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 "TEST_f_f". The macro's parameter are the name of the function, the
skipping to change at line 145 skipping to change at line 138
- "F" for the address of a FLOAT (only as input parameter) - "F" for the address of a FLOAT (only as input parameter)
- "I" for the address of an int (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 - "1" for an additional output (either output through a pointer passed
as an argument, or to a global variable such as signgam). as an argument, or to a global variable such as signgam).
How to read the test output How to read the test output
=========================== ===========================
Running each test on its own at the default level of verbosity will Running each test on its own at the default level of verbosity will
print on stdout a line describing the implementation of math functions print on stdout a line describing the implementation of math functions
exercised by the test (float, double, or long double), along with exercised by the test (float, double, or long double). This is then
whether the inline set has been selected, regardless of whether or followed by the details of test failures (if any). The output concludes
not any inline functions actually exist. This is then followed by by a summary listing the number of test cases exercised and the number
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. of test failures uncovered.
For each test failure (and for each test case at higher levels of For each test failure (and for each test case at higher levels of
verbosity), the output contains the name of the function under test verbosity), the output contains the name of the function under test
and its arguments or conditions that triggered the failure. Note and its arguments or conditions that triggered the failure. Note
that the name of the function in the output need not correspond that the name of the function in the output need not correspond
exactly to the name of the math function actually invoked. For example, 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 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 under test is acosf (for the float version) or acosl (for the long
double version). Also note that the function arguments may be shown double version). Also note that the function arguments may be shown
 End of changes. 4 change blocks. 
20 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)