154 SUBROUTINE stbt02( 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
168 REAL ab( ldab, * ), b( ldb, * ), work( * ),
176 parameter( zero = 0.0e+0, one = 1.0e+0 )
180 REAL anorm, bnorm, eps, xnorm
197 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
204 IF(
lsame( trans,
'N' ) )
THEN
205 anorm =
slantb(
'1', uplo, diag, n, kd, ab, ldab, work )
207 anorm =
slantb(
'I', uplo, diag, n, kd, ab, ldab, work )
213 IF( anorm.LE.zero )
THEN
223 CALL
scopy( n, x( 1, j ), 1, work, 1 )
224 CALL
stbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
225 CALL
saxpy( n, -one, b( 1, j ), 1, work, 1 )
226 bnorm =
sasum( n, work, 1 )
227 xnorm =
sasum( n, x( 1, j ), 1 )
228 IF( xnorm.LE.zero )
THEN
231 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )