README:  (updated DMC 23 Jun 2003).

The program  `dpolft_test'  demonstrates the numerical equivalence
of the r8slatec "dpolft" subroutine to NAG routine "e02adf".  Although
dpolft returns a polynomial fit that is not in Chebyshev form, it is
numerically identical, and therefore readily transformable into a
numerically identical Chebyshev form by using a "Numerical Recipes"
procedure -- see subroutine chbfit in cheby.for.

This makes it possible to build a replacement for the NAG routine,
and thus remove a commericial license dependency in software needing
access to something equivalent to NAG e02adf.

A script, dpolft_make.csh, is provided to build the program; this 
should work on 32 bit machines which have NTCC and NAG libraries 
already built.  The script needs to be told

  (a) what fortran-90 compile command to use,
  (b) where on your system to find the NTCC libraries
  (c) where on your system to find the NAG library.

These are specified as environment variables.  See the script for
details.

-----------------------------------
(original comments -- March 2003).

It is best to  load `dpolft_test' with the NAG library, if it is 
available.  This allows a comparison between the freeware polynomial
curve fitting routine "dpolft", and the NAG routine "e02adf", to be
run.

`dpolft_test' tests the SLATEC routine "dpolft".  First it runs through
the standard set of SLATEC tests (except the "invalid" test which
produces a scary message).  Then, it enters a (uread/sglib) interactive
section which allows comparison of least-squares polynomial fits
derived by the two methods, SLATED "dpolft" and NAG "e02adf".

To run any uread/sglib program, users should execute in an `xterm' window
with the following environment variable set:

  TERMINAL_TYPE = "XTERM".

Macintosh/Versaterm users can execute with TERMINAL_TYPE = "MAC".  Genuine
`xterm' emulators support a "Tektronix-4010" graphics emulator, which is
used by uread/sglib programs.

The `dpolft_test' program comes with a driver script, "dpolft_test.ind",
which will put the program through its paces:

  > dpolft_test @dpolft_test

in a directory containing a copy of dpolft_test.ind.  This should produce
text output very similar to the reference output file 

  dpolft_test.reference_output

and, graphics output very similar to the reference graphics output file

  dpolft_test.ps.

If all is working as intended, the program demonstrates that dpolft is
an effective replacement for the proprietary e02adf routine, to a high
degree of double precision accuracy.

  --D. McCune 27 Mar 2003
