
PROGRAM TEST

IMPLICIT NONE

C

INTEGER LDA, N

PARAMETER (N = 3)

PARAMETER (LDA = N)

C

DOUBLE PRECISION A(LDA,N+1)

INTEGER I

C

EXTERNAL DTRSV

C

C Initialize the first 3x3 elements of the array A to store

C in triangular form the matrix A shown below. Initialize

C the last column of A to store the vector b shown below.

C

C 1 7

C A = 2 4 b = 46 b is stored in the

C 3 5 7 115 last column of A

C

DATA A /1.0D0, 2.0D0, 3.0D0, 8.0D8, 4.0D0, 5.0D0,

$ 8.0D8, 8.0D8, 6.0D0, 7.0D0, 4.6D1, 1.15D2 /

PRINT 1000

PRINT 1010, A(1,1)

PRINT 1010, A(2,1), A(2,2)

PRINT 1010, A(3,1), A(3,2), A(3,3)

PRINT 1020

PRINT 1030, (A(I,4), I = 1, N)

CALL DTRSV ('LOWER TRIANGULAR A', 'NOT TRANSPOSED A',

$ 'NOT UNIT DIAGONAL A', N, A, LDA, A(1,4), 1)

PRINT 1040

PRINT 1030, (A(I,4), I = 1, N)

C

1000 FORMAT (1X, 'A:')

1010 FORMAT (1X, 3(2X, F5.1))

1020 FORMAT (/1X, 'b:')

1030 FORMAT (3X, F5.1)

1040 FORMAT (/1X, 'A**(1) * b:')

C

END

