Trailing-Edge
-
PDP-10 Archives
-
decuslib10-02
-
43,50145/dali.ssp
There are 2 other files named dali.ssp in the archive. Click here to see a list.
C DALI 10
C ..................................................................DALI 20
C DALI 30
C SUBROUTINE DALI DALI 40
C DALI 50
C PURPOSE DALI 60
C TO INTERPOLATE FUNCTION VALUE Y FOR A GIVEN ARGUMENT VALUE DALI 70
C X USING A GIVEN TABLE (ARG,VAL) OF ARGUMENT AND FUNCTION DALI 80
C VALUES. DALI 90
C DALI 100
C USAGE DALI 110
C CALL DALI (X,ARG,VAL,Y,NDIM,EPS,IER) DALI 120
C DALI 130
C DESCRIPTION OF PARAMETERS DALI 140
C X - DOUBLE PRECISION ARGUMENT VALUE SPECIFIED BY INPUT.DALI 150
C ARG - DOUBLE PRECISION INPUT VECTOR (DIMENSION NDIM) OF DALI 160
C ARGUMENT VALUES OF THE TABLE (NOT DESTROYED). DALI 170
C VAL - DOUBLE PRECISION INPUT VECTOR (DIMENSION NDIM) OF DALI 180
C FUNCTION VALUES OF THE TABLE (DESTROYED). DALI 190
C Y - RESULTING INTERPOLATED DOUBLE PRECISION FUNCTION DALI 200
C VALUE. DALI 210
C NDIM - AN INPUT VALUE WHICH SPECIFIES THE NUMBER OF DALI 220
C POINTS IN TABLE (ARG,VAL). DALI 230
C EPS - SINGLE PRECISION INPUT CONSTANT WHICH IS USED AS DALI 240
C UPPER BOUND FOR THE ABSOLUTE ERROR. DALI 250
C FOR THE ABSOLUTE ERROR. DALI 260
C IER - A RESULTING ERROR PARAMETER. DALI 270
C DALI 280
C REMARKS DALI 290
C (1) TABLE (ARG,VAL) SHOULD REPRESENT A SINGLE-VALUED DALI 300
C FUNCTION AND SHOULD BE STORED IN SUCH A WAY, THAT THE DALI 310
C DISTANCES ABS(ARG(I)-X) INCREASE WITH INCREASING DALI 320
C SUBSCRIPT I. TO GENERATE THIS ORDER IN TABLE (ARG,VAL), DALI 330
C SUBROUTINES DATSG, DATSM OR DATSE COULD BE USED IN A DALI 340
C PREVIOUS STAGE. DALI 350
C (2) NO ACTION BESIDES ERROR MESSAGE IN CASE NDIM LESS DALI 360
C THAN 1. DALI 370
C (3) INTERPOLATION IS TERMINATED EITHER IF THE DIFFERENCE DALI 380
C BETWEEN TWO SUCCESSIVE INTERPOLATED VALUES IS DALI 390
C ABSOLUTELY LESS THAN TOLERANCE EPS, OR IF THE ABSOLUTE DALI 400
C VALUE OF THIS DIFFERENCE STOPS DIMINISHING, OR AFTER DALI 410
C (NDIM-1) STEPS. FURTHER IT IS TERMINATED IF THE DALI 420
C PROCEDURE DISCOVERS TWO ARGUMENT VALUES IN VECTOR ARG DALI 430
C WHICH ARE IDENTICAL. DEPENDENT ON THESE FOUR CASES, DALI 440
C ERROR PARAMETER IER IS CODED IN THE FOLLOWING FORM DALI 450
C IER=0 - IT WAS POSSIBLE TO REACH THE REQUIRED DALI 460
C ACCURACY (NO ERROR). DALI 470
C IER=1 - IT WAS IMPOSSIBLE TO REACH THE REQUIRED DALI 480
C ACCURACY BECAUSE OF ROUNDING ERRORS. DALI 490
C IER=2 - IT WAS IMPOSSIBLE TO CHECK ACCURACY BECAUSE DALI 500
C NDIM IS LESS THAN 3, OR THE REQUIRED ACCURACY DALI 510
C COULD NOT BE REACHED BY MEANS OF THE GIVEN DALI 520
C TABLE. NDIM SHOULD BE INCREASED. DALI 530
C IER=3 - THE PROCEDURE DISCOVERED TWO ARGUMENT VALUES DALI 540
C IN VECTOR ARG WHICH ARE IDENTICAL. DALI 550
C DALI 560
C SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED DALI 570
C NONE DALI 580
C DALI 590
C METHOD DALI 600
C INTERPOLATION IS DONE BY MEANS OF AITKENS SCHEME OF DALI 610
C LAGRANGE INTERPOLATION. ON RETURN Y CONTAINS AN INTERPOLATEDDALI 620
C FUNCTION VALUE AT POINT X, WHICH IS IN THE SENSE OF REMARK DALI 630
C (3) OPTIMAL WITH RESPECT TO GIVEN TABLE. FOR REFERENCE, SEE DALI 640
C F.B.HILDEBRAND, INTRODUCTION TO NUMERICAL ANALYSIS, DALI 650
C MCGRAW-HILL, NEW YORK/TORONTO/LONDON, 1956, PP.49-50. DALI 660
C DALI 670
C ..................................................................DALI 680
C DALI 690
SUBROUTINE DALI(X,ARG,VAL,Y,NDIM,EPS,IER) DALI 700
C DALI 710
C DALI 720
DIMENSION ARG(1),VAL(1) DALI 730
DOUBLE PRECISION ARG,VAL,X,Y,H DALI 740
IER=2 DALI 750
DELT2=0. DALI 760
IF(NDIM-1)9,7,1 DALI 770
C DALI 780
C START OF AITKEN-LOOP DALI 790
1 DO 6 J=2,NDIM DALI 800
DELT1=DELT2 DALI 810
IEND=J-1 DALI 820
DO 2 I=1,IEND DALI 830
H=ARG(I)-ARG(J) DALI 840
IF(H)2,13,2 DALI 850
2 VAL(J)=(VAL(I)*(X-ARG(J))-VAL(J)*(X-ARG(I)))/H DALI 860
DELT2=DABS(VAL(J)-VAL(IEND)) DALI 870
IF(J-2)6,6,3 DALI 880
3 IF(DELT2-EPS)10,10,4 DALI 890
4 IF(J-8)6,5,5 DALI 900
5 IF(DELT2-DELT1)6,11,11 DALI 910
6 CONTINUE DALI 920
C END OF AITKEN-LOOP DALI 930
C DALI 940
7 J=NDIM DALI 950
8 Y=VAL(J) DALI 960
9 RETURN DALI 970
C DALI 980
C THERE IS SUFFICIENT ACCURACY WITHIN NDIM-1 ITERATION STEPS DALI 990
10 IER=0 DALI1000
GOTO 8 DALI1010
C DALI1020
C TEST VALUE DELT2 STARTS OSCILLATING DALI1030
11 IER=1 DALI1040
12 J=IEND DALI1050
GOTO 8 DALI1060
C DALI1070
C THERE ARE TWO IDENTICAL ARGUMENT VALUES IN VECTOR ARG DALI1080
13 IER=3 DALI1090
GOTO 12 DALI1100
END DALI1110