Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0026/ahi.doc
There are 2 other files named ahi.doc in the archive. Click here to see a list.
SUBROUTINE AHI
PURPOSE
TO INTERPOLATE FUNCTION VALUE Y FOR A GIVEN ARGUMENT VALUE
X USING A GIVEN TABLE (ARG,VAL) OF ARGUMENT, FUNCTION, AND
DERIVATIVE VALUES.
USAGE
CALL AHI (X,ARG,VAL,Y,NDIM,EPS,IER)
DESCRIPTION OF PARAMETERS
X - THE ARGUMENT VALUE SPECIFIED BY INPUT.
ARG - THE INPUT VECTOR (DIMENSION NDIM) OF ARGUMENT
VALUES OF THE TABLE (NOT DESTROYED).
VAL - THE INPUT VECTOR (DIMENSION 2*NDIM) OF FUNCTION
AND DERIVATIVE VALUES OF THE TABLE (DESTROYED).
FUNCTION AND DERIVATIVE VALUES MUST BE STORED IN
PAIRS, THAT MEANS BEGINNING WITH FUNCTION VALUE AT
POINT ARG(1) EVERY FUNCTION VALUE MUST BE FOLLOWED
BY THE VALUE OF DERIVATIVE AT THE SAME POINT.
Y - THE RESULTING INTERPOLATED FUNCTION VALUE.
NDIM - AN INPUT VALUE WHICH SPECIFIES THE NUMBER OF
POINTS IN TABLE (ARG,VAL).
EPS - AN INPUT CONSTANT WHICH IS USED AS UPPER BOUND
FOR THE ABSOLUTE ERROR.
IER - A RESULTING ERROR PARAMETER.
REMARKS
(1) TABLE (ARG,VAL) SHOULD REPRESENT A SINGLE-VALUED
FUNCTION AND SHOULD BE STORED IN SUCH A WAY, THAT THE
DISTANCES ABS(ARG(I)-X) INCREASE WITH INCREASING
SUBSCRIPT I. TO GENERATE THIS ORDER IN TABLE (ARG,VAL),
SUBROUTINES ATSG, ATSM OR ATSE COULD BE USED IN A
PREVIOUS STAGE.
(2) NO ACTION BESIDES ERROR MESSAGE IN CASE NDIM LESS
THAN 1.
(3) INTERPOLATION IS TERMINATED EITHER IF THE DIFFERENCE
BETWEEN TWO SUCCESSIVE INTERPOLATED VALUES IS
ABSOLUTELY LESS THAN TOLERANCE EPS, OR IF THE ABSOLUTE
VALUE OF THIS DIFFERENCE STOPS DIMINISHING, OR AFTER
(2*NDIM-2) STEPS. FURTHER IT IS TERMINATED IF THE
PROCEDURE DISCOVERS TWO ARGUMENT VALUES IN VECTOR ARG
WHICH ARE IDENTICAL. DEPENDENT ON THESE FOUR CASES,
ERROR PARAMETER IER IS CODED IN THE FOLLOWING FORM
IER=0 - IT WAS POSSIBLE TO REACH THE REQUIRED
ACCURACY (NO ERROR).
IER=1 - IT WAS IMPOSSIBLE TO REACH THE REQUIRED
ACCURACY BECAUSE OF ROUNDING ERRORS.
IER=2 - IT WAS IMPOSSIBLE TO CHECK ACCURACY BECAUSE
NDIM IS LESS THAN 2, OR THE REQUIRED ACCURACY
COULD NOT BE REACHED BY MEANS OF THE GIVEN
TABLE. NDIM SHOULD BE INCREASED.
IER=3 - THE PROCEDURE DISCOVERED TWO ARGUMENT VALUES
IN VECTOR ARG WHICH ARE IDENTICAL.
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
NONE
METHOD
INTERPOLATION IS DONE BY MEANS OF AITKENS SCHEME OF
HERMITE INTERPOLATION. ON RETURN Y CONTAINS AN INTERPOLATED
FUNCTION VALUE AT POINT X, WHICH IS IN THE SENSE OF REMARK
(3) OPTIMAL WITH RESPECT TO GIVEN TABLE. FOR REFERENCE, SEE
F.B.HILDEBRAND, INTRODUCTION TO NUMERICAL ANALYSIS,
MCGRAW-HILL, NEW YORK/TORONTO/LONDON, 1956, PP.314-317, AND
GERSHINSKY/LEVINE, AITKEN-HERMITE INTERPOLATION,
JACM, VOL.11, ISS.3 (1964), PP.352-356.