152 SUBROUTINE stbt02( 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
165 REAL AB( LDAB, * ), B( LDB, * ), WORK( * ),
173 parameter( zero = 0.0e+0, one = 1.0e+0 )
177 REAL ANORM, BNORM, EPS, XNORM
181 REAL SASUM, SLAMCH, SLANTB
182 EXTERNAL lsame, sasum, slamch, slantb
194 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
201 IF( lsame( trans,
'N' ) )
THEN
202 anorm = slantb(
'1', uplo, diag, n, kd, ab, ldab, work )
204 anorm = slantb(
'I', uplo, diag, n, kd, ab, ldab, work )
209 eps = slamch(
'Epsilon' )
210 IF( anorm.LE.zero )
THEN
220 CALL scopy( n, x( 1, j ), 1, work, 1 )
221 CALL stbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
222 CALL saxpy( n, -one, b( 1, j ), 1, work, 1 )
223 bnorm = sasum( n, work, 1 )
224 xnorm = sasum( n, x( 1, j ), 1 )
225 IF( xnorm.LE.zero )
THEN
228 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx)
STBMV
subroutine stbt02(uplo, trans, diag, n, kd, nrhs, ab, ldab, x, ldx, b, ldb, work, resid)
STBT02