C     APPENDIX E   SAMPLE PROBLEM 1
C     MATRIX ARITHEMTIC
      implicit double precision(a-h,o-z)
      DIMENSION A(7,7),VECTOR(7),B(7,7)
      dimension a1(105)
      equivalence (a,a1), (a1(50),vector), (a1(58),b)
C      SENSE LIGHT 1
      ifirst=1
      DO 1 I=1,7
      DO 1 J=1,7
c      B(I,J)=1./FLOATF(I+J-1)
      B(I,J)=1./dble(I+J-1)
1     A(I,J)=B(I,J)
      PRINT 13
13    FORMAT(15H1HILBERT MATRIX//)
      PRINT 2,A
2     FORMAT(1X,7E14.7)
      PRINT 15
15    FORMAT(8H0INVERSE//)
10    DO 6 K=1,7
c      VECTOR=1.
      vector(1)=1.
      DO 3 I=2,7
3     VECTOR(I)=0.
      DO 4 J=2,8
c4     A(I,J)=A(I,J)/A
4     A(I,J)=A(I,J)/A(1,1)
      DO 5 I=1,55
c5     A(I)  =A(I+1)
5     a1(i) =a1(i+1)
      DO 6 I=1,6
c      A(56) =A(I,I)
      a1(56) =a(i,i)
      DO 6 J=1,7
c6     A(I,J)=A(I,J+1)-A(56)*A(7,J)
6     A(I,J)=A(I,J+1)-A1(56)*A(7,J)
      PRINT 2,A
c      IF(SENSE LIGHT 1)11,12
      if(ifirst) 11,12,11
11    PRINT 16
16    FORMAT(15H0MATRIX PRODUCT//)
      ifirst=0
      DO 9 K=1,7
      DO 8 I=1,7
      VECTOR(I)=0.
      DO 8 J=1,7
8     VECTOR(I)=VECTOR(I)+A(I,J)*B(J,K)
9     PRINT 18,VECTOR
18    FORMAT(1X,7F14.8)
      PRINT 17
17    FORMAT(15H0TWICE INVERTED//)
      GO TO 10
12    PRINT 7
7     FORMAT(1H1)
      STOP 111
      END
