152 SUBROUTINE dtbt02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
153 $ LDX, B, LDB, WORK, RESID )
160 CHARACTER DIAG, TRANS, UPLO
161 INTEGER KD, LDAB, LDB, LDX, N, NRHS
162 DOUBLE PRECISION RESID
165 DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), WORK( * ),
172 DOUBLE PRECISION ZERO, ONE
173 parameter( zero = 0.0d+0, one = 1.0d+0 )
177 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
181 DOUBLE PRECISION DASUM, DLAMCH, DLANTB
182 EXTERNAL lsame, dasum, dlamch, dlantb
194 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
201 IF( lsame( trans,
'N' ) )
THEN
202 anorm = dlantb(
'1', uplo, diag, n, kd, ab, ldab, work )
204 anorm = dlantb(
'I', uplo, diag, n, kd, ab, ldab, work )
209 eps = dlamch(
'Epsilon' )
210 IF( anorm.LE.zero )
THEN
220 CALL dcopy( n, x( 1, j ), 1, work, 1 )
221 CALL dtbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
222 CALL daxpy( n, -one, b( 1, j ), 1, work, 1 )
223 bnorm = dasum( n, work, 1 )
224 xnorm = dasum( n, x( 1, j ), 1 )
225 IF( xnorm.LE.zero )
THEN
228 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dtbt02(uplo, trans, diag, n, kd, nrhs, ab, ldab, x, ldx, b, ldb, work, resid)
DTBT02
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dtbmv(uplo, trans, diag, n, k, a, lda, x, incx)
DTBMV