glibc/math
Ulrich Drepper 09bf6406b1 Update.
2000-09-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc32/bits/endian.h: Remove.
	* sysdeps/sparc/sparc32/ieee754.h: New.
	* sysdeps/sparc/sparc64/bits/endian.h: Move...
	* sysdeps/sparc/bits/endian.h: ...here.
	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): Optimize.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): Check
	%o1, not %o0 to see if we're parent or child.  Optimize.

2000-09-26  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/unix/sysv/linux/ia64/fork.S: New file (based on code
	by Hans Boehm).
	* sysdeps/unix/sysv/linux/ia64/vfork.S: New file (based on
	code by Hans Boehm).
	* sysdeps/unix/sysv/linux/ia64/fork.c: Deleted (obsoleted by fork.S).

2000-09-20  H.J. Lu  <hjl@gnu.org>

	* sysdeps/ia64/fpu/printf_fphex.c: New file.

	* sysdeps/ia64/fpu/libm-test-ulps: New file.

2000-09-17  H.J. Lu  <hjl@gnu.org>

	* sysdeps/ia64/Makefile (long-double-fcts): New.  Defined as yes.

	* sysdeps/ia64/fpu/s_isinfl.c: New file.  Include
	sysdeps/i386/fpu/s_isinfl.c.

	* sysdeps/ia64/fpu/s_isnanl.c: New file.  Include
	sysdeps/i386/fpu/s_isnanl.c.

	* sysdeps/ia64/fpu/s_nextafterl.c: New file.  Include
	sysdeps/i386/fpu/s_nextafterl.c.

	* sysdeps/ia64/fpu/bits/mathdef.h: New file.  Copied from
	sysdeps/i386/fpu/bits/mathdef.h.

2000-09-16  H.J. Lu  <hjl@gnu.org>

	* sysdeps/generic/ldsodefs.h (DL_UNMAP): New.  Defined if
	DL_UNMAP_IS_SPECIAL is not defined.

	* sysdeps/ia64/dl-lookupcfg.h (DL_UNMAP_IS_SPECIAL): Defined.
	(_dl_unmap): New prototype.
	(DL_UNMAP): New.  Defined as _dl_unmap.

	* sysdeps/ia64/Versions [ld] (GLIBC_2.2): Add _dl_unmap.

	* elf/dl-close.c (_dl_close): Replace __munmap with DL_UNMAP.

2000-09-16  H.J. Lu  <hjl@gnu.org>

	* sysdeps/generic/ldsodefs.h (DL_LOOKUP_ADDRESS): New. Defined
	if ELF_FUNCTION_PTR_IS_SPECIAL is not defined.

	* sysdeps/ia64/dl-lookupcfg.h (_dl_lookup_address): New
	prototype.
	(DL_LOOKUP_ADDRESS): New. Defined as _dl_lookup_address.

	* sysdeps/ia64/dl-fptr.c (_dl_lookup_address): New. Lookup
	the memory location of a function from a function descriptor.

	* sysdeps/ia64/Versions [ld] (GLIBC_2.2): Add _dl_lookup_address.

	* elf/dl-addr.c (_dl_addr): Use DL_LOOKUP_ADDRESS to get the
	memory location.

2000-09-14  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/ia64/bits/byteswap.h (__bswap_16): Don't mark output
	variable as input argument.
	(__bswap_32): Likewise.

	* sysdeps/ia64/dl-machine.h: Add missing stop bit in RTLD_START()
	- found by Jim Wilson <wilson@cygnus.com>

2000-09-26  Ulrich Drepper  <drepper@redhat.com>

	* string/strxfrm.c: Only require alignment on __alignof__ (int32_t)
	instead of 4.

2000-09-26  Andreas Schwab  <schwab@suse.de>

	* locale/programs/ld-collate.c (collate_output): Only require
	alignment on __alignof__ (int32_t) instead of 4.
	* locale/loadlocale.c (_nl_load_locale): Likewise.
	* string/strcoll.c: Likewise.

2000-09-26  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/ieee754/ldbl-96/e_atan2l.c (__ieee754_atan2l): Add
	parentheses around arithmetic used in | statement to kill compiler
	warning.

	* math/math_private.h: Add prototype for __finitel.
	(__ilogbl): Likewise.
	(__isinfl): Likewise.
	(__isnanl): Likewise.
	(__atanl): Likewise.
	(__copysignl): Likewise.
	(__expm1l): Likewise.
	(__floorl): Likewise.
	(__frexpl): Likewise.
	(__ldexpl): Likewise.
	(__log1pl): Likewise.
	(__nanl): Likewise.
	(__rintl): Likewise.
	(__scalbnl): Likewise.
	(__sqrtl): Likewise.
	(fabsl): Likewise.
	(__sincosl): Likewise.

	(si_isr) [USE_GNU]: Likewise.
	(ILL_BREAK) [USE_GNU]: Likewise.
	(FPE_DECOVF) [USE_GNU]: Likewise.
	(FPE_DECDIV) [USE_GNU]: Likewise.
	(FPE_DECERR) [USE_GNU]: Likewise.
	(FPE_INVASC) [USE_GNU]: Likewise.
	(FPE_INVDEC) [USE_GNU]: Likewise.
	(TRAP_BRANCH) [USE_GNU]: Likewise.
	(TRAP_HWBKPT) [USE_GNU]: Likewise.
	* sysdeps/ieee754/flt-32/s_exp2f.c: Likewise.
2000-09-26 19:13:37 +00:00
..
bits Update. 2000-09-16 01:39:48 +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. 1998-09-11 12:14:37 +00:00
atest-exp.c Update. 1998-09-11 12:14:37 +00:00
atest-sincos.c Update. 1998-09-11 12:14:37 +00:00
basic-test.c Update. 1999-10-12 16:00:04 +00:00
cabs.c Update. 1998-11-10 19:11:20 +00:00
cabsf.c Update. 1998-11-10 19:11:20 +00:00
cabsl.c Update. 1998-11-10 19:11:20 +00:00
carg.c Update. 1997-06-04 19:05:38 +00:00
cargf.c Update. 1997-03-29 17:32:35 +00:00
cargl.c Update. 1997-03-29 17:32:35 +00:00
cimag.c Update. 1998-11-10 19:11:20 +00:00
cimagf.c Update. 1998-11-10 19:11:20 +00:00
cimagl.c Update. 1998-11-10 19:11:20 +00:00
complex.h Update. 2000-09-16 01:39:48 +00:00
conj.c Update. 1998-11-10 19:11:20 +00:00
conjf.c Update. 1998-11-10 19:11:20 +00:00
conjl.c Update. 1998-11-10 19:11:20 +00:00
creal.c Update. 1998-11-10 19:11:20 +00:00
crealf.c Update. 1998-11-10 19:11:20 +00:00
creall.c Update. 1998-11-10 19:11:20 +00:00
fenv.h Update. 1999-11-17 18:52:42 +00:00
gen-libm-test.pl (parse_ulps): Remove extra \. 2000-08-30 16:32:14 +00:00
ieee-math.c * hurd/hurdinit.c (map0): Remove [!PIC] conditional. 1996-06-16 09:31:23 +00:00
libm-test.inc Update. 2000-09-21 15:51:53 +00:00
Makefile Update. 2000-09-01 07:00:07 +00:00
math_private.h Update. 2000-09-26 19:13:37 +00:00
math.h Update. 2000-09-14 01:43:19 +00:00
README.libm-test Update. 1999-10-25 20:18:27 +00:00
test-double.c Update. 1999-10-19 06:29:27 +00:00
test-fenv.c (feenv_tests): Clear all exceptions before first test. (feexcp_nomask_test): Correct printf args. (feexcp_mask_test): Like. 2000-08-19 18:29:19 +00:00
test-float.c Update. 1999-10-19 06:29:27 +00:00
test-fpucw.c Update. 2000-07-29 18:08:15 +00:00
test-idouble.c Update. 1999-10-19 06:29:27 +00:00
test-ifloat.c Update. 1999-10-19 06:29:27 +00:00
test-ildoubl.c Update. 1999-10-19 06:29:27 +00:00
test-ldouble.c Update. 1999-10-19 06:29:27 +00:00
test-matherr.c Update. 1997-06-26 00:09:27 +00:00
test-misc.c Update. 2000-01-20 08:27:38 +00:00
tgmath.h Update. 2000-08-20 08:37:13 +00:00
tst-definitions.c Update. 2000-09-01 07:00:07 +00:00
Versions Update. 2000-02-26 01:21:37 +00:00
w_acos.c Update. 1999-07-14 00:54:57 +00:00
w_acosf.c Update. 1999-07-14 00:54:57 +00:00
w_acosh.c Update. 1999-07-14 00:54:57 +00:00
w_acoshf.c Update. 1999-07-14 00:54:57 +00:00
w_acoshl.c Update. 1999-07-14 00:54:57 +00:00
w_acosl.c Update. 1999-07-14 00:54:57 +00:00
w_asin.c Update. 1999-07-14 00:54:57 +00:00
w_asinf.c Update. 1999-07-14 00:54:57 +00:00
w_asinl.c Update. 1999-07-14 00:54:57 +00:00
w_atan2.c Update. 1999-07-14 00:54:57 +00:00
w_atan2f.c Update. 1999-07-14 00:54:57 +00:00
w_atan2l.c Update. 1999-07-14 00:54:57 +00:00
w_atanh.c Update. 1999-07-14 00:54:57 +00:00
w_atanhf.c Update. 1999-07-14 00:54:57 +00:00
w_atanhl.c Update. 1999-07-14 00:54:57 +00:00
w_cosh.c Update. 1999-07-14 00:54:57 +00:00
w_coshf.c Update. 1999-07-14 00:54:57 +00:00
w_coshl.c Update. 1999-07-14 00:54:57 +00:00
w_drem.c Update. 1999-07-14 00:54:57 +00:00
w_dremf.c Update. 1999-07-14 00:54:57 +00:00
w_dreml.c Update. 1999-07-14 00:54:57 +00:00
w_exp2.c Update. 1999-07-14 00:54:57 +00:00
w_exp2f.c Update. 1999-07-14 00:54:57 +00:00
w_exp2l.c Update. 1999-07-14 00:54:57 +00:00
w_exp10.c Update. 1999-07-14 00:54:57 +00:00
w_exp10f.c Update. 1999-07-14 00:54:57 +00:00
w_exp10l.c Update. 1999-07-14 00:54:57 +00:00
w_fmod.c Update. 1999-07-14 00:54:57 +00:00
w_fmodf.c Update. 1999-07-14 00:54:57 +00:00
w_fmodl.c Update. 1999-07-14 00:54:57 +00:00
w_hypot.c Update. 1999-07-14 00:54:57 +00:00
w_hypotf.c Update. 1999-07-14 00:54:57 +00:00
w_hypotl.c Update. 1999-07-14 00:54:57 +00:00
w_j0.c Update. 1999-07-14 00:54:57 +00:00
w_j0f.c Update. 1999-07-14 00:54:57 +00:00
w_j0l.c Update. 1999-07-14 00:54:57 +00:00
w_j1.c Update. 1999-07-14 00:54:57 +00:00
w_j1f.c Update. 1999-07-14 00:54:57 +00:00
w_j1l.c Update. 1999-07-14 00:54:57 +00:00
w_jn.c Update. 1999-07-14 00:54:57 +00:00
w_jnf.c Update. 1999-07-14 00:54:57 +00:00
w_jnl.c Update. 1999-07-14 00:54:57 +00:00
w_lgamma_r.c Update. 1999-07-14 00:54:57 +00:00
w_lgamma.c Update. 1999-10-31 17:37:43 +00:00
w_lgammaf_r.c Update. 1999-07-14 00:54:57 +00:00
w_lgammaf.c Update. 1999-10-31 17:37:43 +00:00
w_lgammal_r.c Update. 1999-07-14 00:54:57 +00:00
w_lgammal.c Update. 1999-10-31 17:37:43 +00:00
w_log10.c Update. 1999-07-14 00:54:57 +00:00
w_log10f.c Update. 1999-07-14 00:54:57 +00:00
w_log10l.c Update. 1999-07-14 00:54:57 +00:00
w_log.c Update. 1999-07-14 00:54:57 +00:00
w_logf.c Update. 1999-07-14 00:54:57 +00:00
w_logl.c Update. 1999-07-14 00:54:57 +00:00
w_pow.c Update. 1999-07-14 00:54:57 +00:00
w_powf.c Update. 1999-07-14 00:54:57 +00:00
w_powl.c Update. 1999-07-14 00:54:57 +00:00
w_remainder.c Update. 1999-07-14 00:54:57 +00:00
w_remainderf.c Update. 1999-07-14 00:54:57 +00:00
w_remainderl.c Update. 1999-07-14 00:54:57 +00:00
w_scalb.c Update. 1999-07-14 00:54:57 +00:00
w_scalbf.c Update. 1999-07-14 00:54:57 +00:00
w_scalbl.c Update. 1999-07-14 00:54:57 +00:00
w_sinh.c Update. 1999-07-14 00:54:57 +00:00
w_sinhf.c Update. 1999-07-14 00:54:57 +00:00
w_sinhl.c Update. 1999-07-14 00:54:57 +00:00
w_sqrtl.c Update. 1999-07-14 00:54:57 +00:00
w_tgamma.c Update. 1999-07-14 00:54:57 +00:00
w_tgammaf.c Update. 1999-07-14 00:54:57 +00:00
w_tgammal.c Update. 1999-07-14 00:54:57 +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, 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 move this away, e.g. "mv ULPs allULPs" and generate the ULPs
for all other formats and concat all ULP files together (e.g. "cat
ULPs >> allULPs").  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 allULPs -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".