.#
.#
.#
.CH "Appendix IV"
.#
.#
.MH "Building The SWT Math Library Tests"
.#
.SH "In General"
The tests provided along with the SWT Math library may be recompiled
and run on your machine to test your own routines or verify the
results presented in this report.  The tests are written in
Fortran 77 and Fortran 66 with command files in Prime CPL.
Consult your system administrator to find where the tests
have been stored on disk; the default location is
with the source code to the SWT Math Library routines.
The single precision tests are in a separate directory from the
double precision tests, but the directions given below apply
to both sets of tests.
.pp
You must have the Software Tools Subsystem and the F77 compiler
to run the tests!  You can recode the routines written in F77 to
either Ratfor or FTN, but be aware of the library that is
used when you choose this option!
.pp
Make sure that the SWT Math Library has been built and installed
in a directory where you can access it.  Set a SWT template in your
account named "=mathlib=" and equal to the SWT pathname to the
library.  The format to do this is:
.be
template -a mathlib //<some path name here>/mathlib
.ee
.#
.SH "Building the Support Routines"
Attach to the directory containing the tests you wish to build and run.
Modify the "subs.f77" file, if necessary, to change the library
routines to be tested.  The routines in the "subs.f77" file which
begin with the letter Z are the routines to modify to invoke the
correct library functions.
.pp
Next, you need to build the support routines.  To do this, simply
run the SWT shell file "make_support".  This will cause the
files "main.b" and "sublib" to be created in your account.
.pp
Next, edit the file "run_test.cpl" so that any necessary local
libraries get loaded along with the tests.  Also include any
special commands that you might wish to execute as part of the
tests.
.#
.SH "Running a Test"
If you execute the SWT shell file "make" with the name of a test
to run (asin, atan, exp, log, power, sqrt, sin, sinh, tan, or tanh)
the SWT shell files and associated Prime CPL files will compile and
load the appropriate test programs, execute them with output
captured to comoutput files, and then produce a file with labelled results
and a report generated by CMPF.  The file created will be named
after the test executed, with the string ".comparison" added to
the end of the name.  For example, if you executed the command
.be
make power
.ee
the file "power.comparison" would be created in your account.
.pp
If you wish to make further modifications to the test software,
examine the SWT shell files and CPL files to determine what needs
to be modified.
