glibc/math
Roland McGrath becf77cd8c * sysdeps/generic/w_exp2.c [NO_LONG_DOUBLE]: Fix typos in alias names.
Reported by Mark Mitchell <mark@codesourcery.com>.
	* Versions.def (libm): Define GLIBC_2.4 set.
	* math/Versions (libm: GLIBC_2.4): Add this set, with exp2l.
	* sysdeps/i386/Versions (libm: GLIBC_2.1): Add this set, with exp2l.
	* sysdeps/ia64/Versions: Likewise.
	* sysdeps/m68k/Versions: Likewise.
	* sysdeps/sparc/sparc64/Versions: Likewise.
	* sysdeps/x86_64/Versions: New file.
	* sysdeps/mips/mips64/Versions: New file.
2005-03-28 20:42:53 +00:00
..
bits 2.5-18.1 2007-07-12 18:26:36 +00:00
machine Update. 1999-07-14 00:54:57 +00:00
.cvsignore Tue May 14 14:07:10 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> 1996-05-14 20:30:25 +00:00
atest-exp2.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
atest-exp.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
atest-sincos.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
basic-test.c 2.5-18.1 2007-07-12 18:26:36 +00:00
bug-nextafter.c 2.5-18.1 2007-07-12 18:26:36 +00:00
bug-nexttoward.c 2.5-18.1 2007-07-12 18:26:36 +00:00
bug-tgmath1.c Update. 2004-05-07 02:14:18 +00:00
cabs.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
cabsl.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
carg.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
cargl.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
cimag.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
cimagl.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
complex.h 2.5-18.1 2007-07-12 18:26:36 +00:00
conj.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
conjl.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
creal.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
creall.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
fenv.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
gen-libm-test.pl 2.5-18.1 2007-07-12 18:26:36 +00:00
ieee-math.c * hurd/hurdinit.c (map0): Remove [!PIC] conditional. 1996-06-16 09:31:23 +00:00
libm-test.inc Update. 2005-01-06 21:52:35 +00:00
Makefile 2.5-18.1 2007-07-12 18:26:36 +00:00
math_private.h * math/math_private.h (__copysign): Define as builtin for gcc 4. (__copysignf, __copysignl): Likewise. * sysdeps/alpha/fpu/bits/mathinline.h (copysign): Don't define for gcc 4.0. (copysignf, copysignl, fabsf, fabs): Likewise. (__copysign, __copysignf, __copysignl): Remove. (__fabs, __fabsf): Remove. 2005-02-08 04:37:48 +00:00
math.h 2.5-18.1 2007-07-12 18:26:36 +00:00
README.libm-test Update. 2004-03-24 22:05:34 +00:00
test-double.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-fenv.c Update. 2003-05-22 02:09:54 +00:00
test-float.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-fpucw.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-idouble.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-ifloat.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-ildoubl.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-ldouble.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-matherr.c Update. 1997-06-26 00:09:27 +00:00
test-misc.c [BZ #779] 2005-03-19 00:28:51 +00:00
test-tgmath-ret.c Update. 2003-06-16 08:03:44 +00:00
test-tgmath.c Update. 2004-04-04 09:32:07 +00:00
tgmath.h 2.5-18.1 2007-07-12 18:26:36 +00:00
tst-definitions.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
Versions * sysdeps/generic/w_exp2.c [NO_LONG_DOUBLE]: Fix typos in alias names. 2005-03-28 20:42:53 +00:00

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".