File POLY360.ZIP from The Programmer’s Corner in
Category Science and Education
POLY Ver 3.60 fits a polynomial or rational polynomials to a set of data.
File Name File Size Zip Size Zip Type
POLY.DAT 128 35 deflated
POLY.DOC 3109 1339 deflated
POLY.EXE 83075 43808 deflated

## Contents of the POLY.DOC file

.ft e
.sp 1
.in 10
.de
Gentle User,

POLY is a program that allows you to fit a curve to a set of data points.
POLY can fit normal polynomials like:

Y=C1+C2*X+C3*X**2+C4*X**3+...

or rational polynomials like:

Y=(P1+P2*X+P3*X**2+P4*X**3+...)/(Q1+Q2*X+Q3*X**2+Q4*X**3+...)

The big advantage to rational polynomials is that they are MUCH more flexible
(e.g. they can take on an infinite value, something that a normal polynomial
can't do for any finite value of X).

POLY can tie "knots" too. That is, fixed points and slopes. (Sorry, no
slopes for rational polynomials). This means that you can have POLY make the
polynomial fit exactly at a few points, or have a specified slope at some
point, or a zero second derivitive at another point, and fit as best as it can
everywhere else.

POLY can also determine the group of functions that best fit your data from a
set of 60 common functions like:

1, X, X**2, X**3, ..., 1/X, 1/X**2,..., EXP(X), X*EXP(X), ...,
EXP(-X), X*EXP(-X), ..., SIN(X), COS(X), SIN(2*X), COS(2*X),...

POLY will automatically select the ones from this list that when taken as a
group will best fit your function. This is no trivial task! and sometines
doesn't work.

To run POLY just enter "POLY" (without the quotes). It's all interactive.
The first thing it will ask is if you want to read the data from a file. If
you want to try this, respond "Y" (without the quotes) and give it the file
name "POLY.DAT" when asked for the file name. POLY can read data in
free-format from any two of up to 20 columns of data in a file. Otherwise you
can enter the data from the keyboard.

You can edit the data. That is, list it and change values. Then when you
have verified it, POLY will ask you if you want automatic selection of
functions. You can try this and see what you get. It really should be sort
of self-explanatory.

You can see the form of the curve-fit by responding "Y" (without the quotes)
when asked. What POLY will list is the actual FORTRAN code, just like you
would put into a program to use the curve-fit. It may look a little strange,
but that's because the polynomial is in Horner's form. It will work!

You can check to see how the curve-fit does by responding "Y" (without the
quotes) when asked to check agreement. You can evaluate the curve-fit at as
many locations as you want (just enter a blank line or "NO" to quit
evaluating). You can perform several curve-fits on the same data without
entering it again. Just wait until the end and it will asy you "another fit
on the same data?(Y/N)."

Dudley J. Benton
TVA Engineering Lab
P.O. Drawer E
Norris, TN 37828
(615) 632-1887

December 18, 2017