Trailing-Edge
-
PDP-10 Archives
-
decus_20tap2_198111
-
decus/20-0026/qdint.smp
There are 2 other files named qdint.smp in the archive. Click here to see a list.
C QDIN 10
C ..................................................................QDIN 20
C QDIN 30
C SAMPLE PROGRAM FOR INTEGRATION OF A TABULATED FUNCTION BY QDIN 40
C NUMERICAL QUADRATURE - QDINT QDIN 50
C QDIN 60
C PURPOSE QDIN 70
C INTEGRATES A SET OF TABULATED VALUES FOR F(X) GIVEN THE QDIN 80
C NUMBER OF VALUES AND THEIR SPACING QDIN 90
C QDIN 100
C REMARKS QDIN 110
C THE NUMBER OF VALUES MUST BE MORE THAN TWO AND THE SPACING QDIN 120
C GREATER THAN ZERO QDIN 130
C QDIN 140
C SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED QDIN 150
C QSF QDIN 160
C QDIN 170
C METHOD QDIN 180
C READS CONTROL CARD CONTAINING THE CODE NUMBER, NUMBER OF QDIN 190
C VALUES, AND THE SPACING OF THE FUNCTION VALUES CONTAINED QDIN 200
C ON THE FOLLOWING DATA CARDS. DATA CARDS ARE THEN READ AND QDIN 210
C INTEGRATION IS PERFORMED. MORE THAN ONE CONTROL CARD AND QDIN 220
C CORRESPONDING DATA CAN BE INTEGRATED IN ONE RUN. EXECUTION QDIN 230
C IS TERMINATED BY A BLANK CONTROL CARD. QDIN 240
C QDIN 250
C ..................................................................QDIN 260
C QDIN 270
C THE FOLLOWING DIMENSION MUST BE AS LARGE AS THE MAXIMUM NUMBER QDIN 280
C OF TABULATED VALUES TO BE INTEGRATED QDIN 290
C QDIN 300
DIMENSION Z(500) QDIN 310
C QDIN 320
C ...............................................................QDIN 330
C QDIN 340
C IF A DOUBLE PRECISION VERSION OF THIS ROUTINE IS DESIRED, THE QDIN 350
C C IN COLUMN 1 SHOULD BE REMOVED FROM THE DOUBLE PRECISION QDIN 360
C STATEMENT WHICH FOLLOWS. QDIN 370
C QDIN 380
C DOUBLE PRECISION Z,SPACE QDIN 390
C QDIN 400
C ...............................................................QDIN 410
C QDIN 420
10 FORMAT (2I5,F10.0) QDIN 430
20 FORMAT(1H1,62HINTEGRATION OF TABULATED VALUES FOR DY/DX USING SUBRQDIN 440
1OUTINE QSF//1H ,10HFUNCTION ,I5,3X,I5,17H TABULATED VALUES, QDIN 450
25X,10HINTERVAL =,E15.8//) QDIN 460
22 FORMAT(1H ,17HILLEGAL CONDITION/) QDIN 470
23 FORMAT(1H ,45HNUMBER OF TABULATED VALUES IS LESS THAN THREE) QDIN 480
30 FORMAT(1H ,7X,'RESULTANT VALUE OF INTEGRAL AT EACH STEP IS ',/ QDIN 490
1(1H ,6E15.8)) QDIN 500
32 FORMAT(7F10.0) QDIN 510
C QDIN 520
35 READ(5,10)ICOD,NUMBR,SPACE QDIN 530
IF(ICOD+NUMBR)70,70,38 QDIN 540
38 WRITE(6,20)ICOD,NUMBR,SPACE QDIN 550
50 READ(5,32)(Z(I),I=1,NUMBR) QDIN 560
IF(NUMBR-3)100,55,55 QDIN 570
55 CALL QSF(SPACE,Z,Z,NUMBR) QDIN 580
60 WRITE(6,30)(Z(I),I=1,NUMBR) QDIN 590
GO TO 35 QDIN 600
70 RETURN QDIN 610
100 WRITE(6,22) QDIN 620
WRITE (6,23) QDIN 630
GO TO 35 QDIN 640
200 WRITE(6,22) QDIN 650
GO TO 35 QDIN 660
END QDIN 670