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
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 )
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 )