Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0020/invhil.alg
There are 2 other files named invhil.alg in the archive. Click here to see a list.
1000'  NAME--INVHIL
1010'
1020'  DESCRIPTION--A SUBROUTINE WHICH PRODUCES THE INVERSE OF A FINITE
1030'  SEGMENT OF THE HILBERT MATRIX.
1040'
1050'  SOURCE--UNKNOWN
1060'
1070'  INSTRUCTIONS--CALL AS NORMAL SUBROUTINE USING A "GOSUB"
1080'  STATEMENT. THE VARIABLES USED ARE N,I,J,K,W, AND THE MATRIX
1090'  S. N IS THE SIZE OF THE MATRIX.
1100'
1110'
1120'  *  *  *  *  *  *  *  *  MAIN PROGRAM  *  *  *  *  *  *  *  *  *  *
1130'
1140  DIM S(15,15)
1150  LET W = N^2
1160  LET S(1,1) = W
1170  FOR I = 2 TO N
1180     LET W = W * ((N+I-1)*(N-I+1)/(I-1)^2)^2
1190     LET S(I,I) = W
1200  NEXT I
1210  FOR I = 1 TO N-1
1220     FOR J = I+1 TO N
1230        LET K = J-1
1240        LET S(I,J) = -S(I,K)*(N+K)*(N-K)/K^2
1250     NEXT J
1260  NEXT I
1270  FOR I = 2 TO N
1280     FOR J = 1 TO I
1290        LET S(J,I) = S(J,I)/(I+J-1)
1300        LET S(I,J) = S(J,I)
1310     NEXT J
1320  NEXT I
1330  RETURN