      SUBROUTINE HILBER (A, LDA, N)
      IMPLICIT NONE
C
C GENERATE INVERSE HILBERT MATRIX
C
      INTEGER LDA, N
      DOUBLE PRECISION A(LDA,N)
C
      INTEGER I, J, IP1
      DOUBLE PRECISION P, R
C
      DOUBLE PRECISION DFLOAT
C
C
      P = DFLOAT (N)
      DO 20 I = 1, N
        IF (I.NE.1) P = (DFLOAT (N-I+1)*P*
     .                   DFLOAT (N+I-1))/DFLOAT (I-1)**2
        R = P*P
        A(I,I) = R/DFLOAT (2*I-1)
        IF (I.EQ.N) GO TO 20
        IP1 = I+1
        DO 10 J = IP1, N
          R = -(DFLOAT (N-J+1)*R*(N+J-1))/DFLOAT (J-1)**2
          A(I,J) = R/DFLOAT (I+J-1)
          A(J,I) = A(I,J)
10      CONTINUE
20    CONTINUE
C
      RETURN
      END
