next up previous index
Next: E102 Maximum and Up: CERNLIB Previous: D704 Complex Fast

E100 Polynomial Interpolation

Routine ID: E100
Author(s): F. JamesLibrary: KERNLIB
Submitter: Submitted: 05.09.1966
Language: FortranRevised: 18.11.1985

Subroutine POLINT interpolates in a table of arguments aj and function values fj= f(aj) , using an interpolating polynomial of specified degree K-1 which passes through K successive tabular points. The table arguments aj need not be equidistant. Meaningful results can usually be obtained only for small values of K (typically less than 10).

Structure:

SUBROUTINE subprogram
User Entry Names: POLINT
Files Referenced: Printer
External References: KERMTR (N001), ABEND (Z035)

Usage:

    CALL POLINT(F,A,K,X,R)
F
( REAL) One-dimensional array. F(j) must be equal to the value at A(j) of the function to be interpolated, (j=1,2,...,K) .
A
( REAL) One-dimensional array. A(j) must be equal to the table argument aj,(j=1,2,...,K) .
K
( INTEGER) K-1 is the degree of the interpolating polynomial.
X
( REAL) Argument at which the interpolating polynomial is to be evaluated.
R
( REAL) On exit, R is set equal to the value at X of the polynomial passing through the points (aj,fj),(j=1,2,...,K) .
If X lies outside the range of the points A(1),...,A(K) , the interpolation becomes an extrapolation, with consequent loss of accuracy.

Method:

Newton's divided difference formula is used.

Restrictions:

2 ≤K ≤20 . If K>20 , the interpolation is performed as if K had the value 20. The original value of K is unchanged on exit.

Error handling:

Error E100.1: K < 1 . A message is printed unless subroutine KERSET (N001) has been called.

Notes:

POLINT is intended for interpolation using all the tabulated points in the array A. To use only the tabulated points around the value of the argument X, use DIVDIF (E105).
•

E102



next up previous index
Next: E102 Maximum and Up: CERNLIB Previous: D704 Complex Fast


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995