154 SUBROUTINE dtbt02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
155 $ ldx, b, ldb, work, resid )
163 CHARACTER DIAG, TRANS, UPLO
164 INTEGER KD, LDAB, LDB, LDX, N, NRHS
165 DOUBLE PRECISION RESID
168 DOUBLE PRECISION AB( ldab, * ), B( ldb, * ), WORK( * ),
175 DOUBLE PRECISION ZERO, ONE
176 parameter ( zero = 0.0d+0, one = 1.0d+0 )
180 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
184 DOUBLE PRECISION DASUM, DLAMCH, DLANTB
185 EXTERNAL lsame, dasum, dlamch, dlantb
197 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
204 IF( lsame( trans,
'N' ) )
THEN
205 anorm = dlantb(
'1', uplo, diag, n, kd, ab, ldab, work )
207 anorm = dlantb(
'I', uplo, diag, n, kd, ab, ldab, work )
212 eps = dlamch(
'Epsilon' )
213 IF( anorm.LE.zero )
THEN
223 CALL dcopy( n, x( 1, j ), 1, work, 1 )
224 CALL dtbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
225 CALL daxpy( n, -one, b( 1, j ), 1, work, 1 )
226 bnorm = dasum( n, work, 1 )
227 xnorm = dasum( n, x( 1, j ), 1 )
228 IF( xnorm.LE.zero )
THEN
231 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine dtbt02(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X, LDX, B, LDB, WORK, RESID)
DTBT02
subroutine dtbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
DTBMV