
PROGRAM TEST

IMPLICIT NONE

C

INTEGER LDA, N, NDIAG

PARAMETER (N = 4)

PARAMETER (NDIAG = 2)

PARAMETER (LDA = NDIAG + 1)

C

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

INTEGER I, J

C

EXTERNAL DTBMV

INTRINSIC DBLE

C

C Initialize the array A to store in triangular banded form

C the matrix A shown below. Initialize the array X to store

C the vector x shown below.

C

C 1 4

C A = 2 4 x = 3

C 3 5 7 2

C 6 8 9 1

C

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

$ 7.0D0, 8.0D0, 8.8D8, 9.0D0, 8.8D8, 8.8D8 /

C

DO 10, I = 1, N

X(I) = DBLE (5  I)

10 CONTINUE

PRINT 1000

PRINT 1010, A(1,1)

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

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

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

PRINT 1030

DO 20, I = 1, LDA

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

20 CONTINUE

PRINT 1040

PRINT 1050, X

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

$ 'NOT UNIT DIAGONAL A', N, NDIAG, A, LDA, X, 1)

PRINT 1060

PRINT 1050, X

C

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

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

1020 FORMAT (1X, 7X, 3(2X, F5.1))

1030 FORMAT (/1X, 'A in banded form: (* in unused elements)')

1040 FORMAT (/1X, 'Original x vector:')

1050 FORMAT (1X, 2X, F5.1)

1060 FORMAT (/1X, 'Ax:')

C

END

