%% /u/sy/beebe/src/elefunt/c/test-sp/README, Thu Jun 27 18:04:25 2002
%% Edit by Nelson H. F. Beebe <beebe@math.utah.edu>

This directory contains clean hand translations to C of Fortran files
from ../fortran/test/*.f.

Automated translations with, say, f2c, do not produce easily
maintainable code, and they also require outside support in the form of
C header files and a runtime library.

These functions provide two new tests:

	talogp1 tdlogp1 tqlogp1		test of log1p() family
	texpm1 tdexpm1 tqexpm1		test of expm1() family

Documentation of the testing and implementations of the elementary
functions can be found in the expm1.* and log1p.* documents elsewhere in
the ELEFUNT tree.

There are several variants of the log1p() and expm1() functions, in the
files {my,}{alog1p,expm1}*.c.  The test results are stored in files
named *.lst and *.lst-*.  The former are the result of the native C
library's log1p() and expm1() functions, and the latter correspond to
various private implementations of those functions.

Listing files from Sun Solaris 2.8 (Java 1.3 and/or 1.4) are preserved
in the okay/*.lst* files, for comparison with results from other
systems.  To get a quick overview of the lengthy ELEFUNT results, do
this:

	grep ' LOSS ' *.lst*

New implementations can be easily added in files named
<PREFIX>{alog1p,expm1}<SUFFIX>.c, and tested by, e.g.,

	make talog1p CC=xxx CFLAGS=xxx LIBS=xxx P=<PREFIX> S=<SUFFIX>
	NAME=xxx

If they are to be a permanent part of the collection, then they should
have PREFIX "my" and new suffixes that get added to the MY*SUFFIXES
lists in the Makefile.

Since these translations were done 15 years after than those for the
original ELEFUNT-in-C effort, I have updated the code to use more modern
practices.  In particular, the code assumes C89 syntax: an old-style K&R
compiler will not handle this code.

In addition, the C code was written with a view toward further
translation to Java: except for the test files that are full of I/O
statements, the C code needs little more than a class wrapper to turn it
into a valid Java file.

The Makefiles in ../test-{sp,dp,qp} differ only by one line: the value
of their default target, "all".  That was cleaner than tailoring each
one to handle just one precision.  While it would have been possible to
store the three precisions in a single directory, as I did for the
Fortran code, the coding conventions in the 1987 version required
separate directories, so I kept to that practice for this new code.
