LINEAR INTERPOLATION UTILITIES FOR HP48G.
This zip file includes:

INTPOL.lib 	library  with several utilities for (linear)
		interpolation.
INTPD     	"double interpolation" between tabulated values.
EXAMPLE.INP 	example input for "double interpolation" 

The above files are given away for free, "shareware". 
The programs are thought to be safe, input are thoroughly checked,
but you use them at your own risk.

Comments / bug reports may be sent to: gjermund.skailand@dnv.com

Best regards
Gjermund Skailand
------------------------------------------------------------------

INTPD is a free-standing version of INTPD in the INTP.lib library.

input                 { array (real) }
[[X1 Y1 a ... n ]
 [X1 Y2 a ... n ]
 [X2 Y1 a ... n ]
 [x2 Y2 a ... n ]]
[X Y]                 { array (real) }

output:            
a(X,Y)
.....
n(X,Y)

Please note that X1, X1, X2, X2 should be ordered as shown,
otherwise you might generate an "infinite result" error. 


As an example, find v, h & s at 275 Deg R at a pressure
of 1100 lbf/in^2:

Temp           1000 lbf/in^2             2000 lbf/in^2
Deg R          v       h      s         v       h      s
250        .0364  78.126  .4145      .0286  70.200  .3596
300        .0828 115.224  .5514      .0398  97.820  .4599

enter the table as an array and enter values to interpolate
(run  EXAMPLE.INP).

run INTPD

You should now get the following result for 275 Deg R at
a pressure of 1100 lbf/in^2: (v=.05706, h=95.4085, s=.47563)  
 
.05706    
95.4085   
.47563    

------------------------------------------------------------------

Programs included in INTP.LIB version 1.0 99-06-20 

INTP   : linear interpolation, 5 real values on stack
------------------------------------------------------------------
TABINT : linear interpolation within a table (linear extrapolation
	 based on closest values if outside table ) 

input:
[[x1, y1][x2, y2]..[xn, yn]]
X

output:
Y(X)  

Note that  x1<x2<..<xn    n>=2
	X can also be a list {Xa Xb ..}
------------------------------------------------------------------
INTP2 : Same as DINT described above
Note that [X,Y) can be a list {[Xa,Ya][Xb,Yb]..}
------------------------------------------------------------------
NINTP : n'th degree polynomial interpolation based on input array.

input:
[[x1, y1][x2, y2]..[xn, yn]]
X  

output:
Y(X)  

NOTE X can also be X can also be a list {Xa Xb ..}

Program included "just for fun". The program uses recursive linear 
interpolation ("dividing differences") Use with care, as 
(high n>4?) n'degree interpolation is prone to numerical error
build-up. 

For practical use linear interpolation is normally OK. If not,
consider (other tools than HP48) / spline interpolation, or other
approximations / regression, which may better describe the actual
functions to be approximated.
