
PROGRAM TEST

IMPLICIT NONE

C

DOUBLE PRECISION ZERO

INTEGER LDA, N, NDIAG

PARAMETER (N = 4)

PARAMETER (NDIAG = 1)

PARAMETER (LDA = NDIAG + 1)

PARAMETER (ZERO = 0.0D0)

C

DOUBLE PRECISION A(LDA,N), B(N)

INTEGER I, J

C

EXTERNAL DTBSV

C

C Initialize the array A to store in triangular banded form

C the triangular banded matrix A shown below. Initialize

C the array B to store the vector b shown below.

C

C 1 8

C A = 2 3 b = 43

C 4 5 86

C 6 7 137

C

DATA A / 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0, 7.0D0,

$ 8D8 /

DATA B / 8.0D0, 4.3D1, 8.6D1, 1.37D2 /

C

PRINT 1000

PRINT 1010, A(1,1)

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

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

PRINT 1030, A(2,3), A(1,4)

PRINT 1040

DO 10, I = 1, LDA

PRINT 1010, (A(I,J), J = 1, N)

10 CONTINUE

PRINT 1050

PRINT 1060, B

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

$ 'NOT UNIT DIAGONAL A', N, 1, A, LDA, B, 1)

PRINT 1070

PRINT 1060, B

C

1000 FORMAT (1X, 'A in full form:')

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

1020 FORMAT (8X, 2(2X, F5.1))

1030 FORMAT (15X, 2(2X, F5.1))

1040 FORMAT (/1X, 'A in triangular banded form: ',

$ '(* in unused elements)')

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

1060 FORMAT (3X, F5.1)

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

C

END

