Rational Function Interpolation for the HP-41

This program is supplied without representation or warranty of any kind.
Jean-Marc Baillard and The Museum of HP Calculators therefore assume no
responsibility and shall have no liability, consequential or otherwise, of
any kind arising from the use of this program material or any part thereof.

-Thus, f(x) = p(x)/q(x) with
deg(p) = deg(q) if
n is odd
and deg(p) = deg(q) + 1 if n is even
( the degrees may of course be smaller if some leading coefficients equal
zero )

-However, if n is even, you may prefer: deg(p) = deg(q)
- 1
-In this case, simply set flag F02 and the above formula will be applied
to 1/y
-But this will work only if all y-values are different from zero.

Flags: F01-F02-F10 Set flag F01
after executing the routine once: it will avoid to re-calculate the reciprocal
differences.
Set flag F02 if you prefer that the degree of the numerator is smaller
than the degree of the denominator ( if n is even )
Subroutines: /

-If y1 equals another y-value, there will be a DATA
ERROR , so always choose the first point such that y1 is different
from all other yk-There is always a small risk that some denominators equal 0. If it
ever happens, change the order of the data points and start again...

-This program only deals with the cases: deg(numerator) = deg(denominator)
if n is odd and deg(numerator) = deg(denominator) +/-1
if n is even,
but there are many other possibilities.
-For instance, if you want to fit a set of data points ( xi
, yi ) to a rational function of the type 1/p(x)
where p is a polynomial,
you can use Lagrange's interpolation formula to the set ( xi
, 1/yi ) and take the reciprocal of the results.