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
184 REAL SASUM, SLAMCH, SLANTB
185 EXTERNAL lsame, sasum, slamch, slantb
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 )
212 eps = slamch(
'Epsilon' )
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 )
subroutine stbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
STBMV
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
subroutine stbt02(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X, LDX, B, LDB, WORK, RESID)
STBT02
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY