Trailing-Edge
-
PDP-10 Archives
-
decus_20tap1_198111
-
decus/20-0020/romint.clc
There are 2 other files named romint.clc in the archive. Click here to see a list.
10000' NAME--ROMINT
10010'
10020' DESCRIPTION--SUBROUTINE FOR PERFORMING ROMBERG'S EQUATION.
10030'
10040' SOURCE--UNKNOWN
10050'
10060' INSTRUCTIONS--THE SUBROUTINE ASSUMES THAT L IS EQUAL
10070' TO THE LEFT POINT END POINT, THAT R IS EQUAL TO THE
10080' RIGHT END POINT, THAT O IS THE DESIRED ORDER OF THE INTEGRATION,
10090' AND THET FNC IS THE FUNCTION TO BE INTEGRATED. THE ANSWER IS
10100' V. THE ROUTINE USES THE LIST Z, AND THE VARIABLES
10110' Z5 THROUGH Z9. THE SUBROUTINE PROPER STARTS IN LINE 10170
10120' AND CONTINUES THROUGH LINE 10350.
10130'
10140'
10150' * * * * * * SUBROUTINE * * * * * * * * * * *
10160'
10170 LET Z7 = (R - L)/2
10180 LET Z8 = 1
10190 LET Z(1) = (FNC(L) + FNC(R))/2
10200 FOR Z5 = 1 TO O
10210 LET Z6 = 0
10220 FOR Z9 = 1 TO 2*Z8 - 1 STEP 2
10230 LET Z6 = Z6 + FNC(L + Z9*Z7)
10240 NEXT Z9
10250 LET Z(Z5 + 1) = ( Z6/Z8 + Z(Z5) )/2
10260 LET Z6 = 1
10270 FOR Z9 = Z5 TO 1 STEP -1
10280 LET Z6 = 4*Z6
10290 LET Z(Z9) = Z(Z9 + 1) + (Z(Z9 + 1) - Z(Z9))/(Z6 - 1)
10300 NEXT Z9
10310 LET Z8 = Z8*2
10320 LET Z7 = Z7/2
10330 NEXT Z5
10340 LET V = Z(1)*(R - L)
10350 RETURN