172 SUBROUTINE stbt03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
173 $ SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
181 CHARACTER DIAG, TRANS, UPLO
182 INTEGER KD, LDAB, LDB, LDX, N, NRHS
183 REAL RESID, SCALE, TSCAL
186 REAL AB( LDAB, * ), B( LDB, * ), CNORM( * ),
187 $ WORK( * ), X( LDX, * )
194 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
198 REAL BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
204 EXTERNAL lsame, isamax, slamch
210 INTRINSIC abs, max, real
216 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
220 eps = slamch(
'Epsilon' )
221 smlnum = slamch(
'Safe minimum' )
222 bignum = one / smlnum
228 IF( lsame( diag,
'N' ) )
THEN
229 IF( lsame( uplo,
'U' ) )
THEN
231 tnorm = max( tnorm, tscal*abs( ab( kd+1, j ) )+
236 tnorm = max( tnorm, tscal*abs( ab( 1, j ) )+cnorm( j ) )
241 tnorm = max( tnorm, tscal+cnorm( j ) )
250 CALL scopy( n, x( 1, j ), 1, work, 1 )
251 ix = isamax( n, work, 1 )
252 xnorm = max( one, abs( x( ix, j ) ) )
253 xscal = ( one / xnorm ) / real( kd+1 )
254 CALL sscal( n, xscal, work, 1 )
255 CALL stbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
256 CALL saxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
257 ix = isamax( n, work, 1 )
258 err = tscal*abs( work( ix ) )
259 ix = isamax( n, x( 1, j ), 1 )
260 xnorm = abs( x( ix, j ) )
261 IF( err*smlnum.LE.xnorm )
THEN
268 IF( err*smlnum.LE.tnorm )
THEN
275 resid = max( resid, err )
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx)
STBMV
subroutine stbt03(uplo, trans, diag, n, kd, nrhs, ab, ldab, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
STBT03