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 )
subroutine stbt02(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X, LDX, B, LDB, WORK, RESID)
STBT02
real function slantb(NORM, UPLO, DIAG, N, K, AB, LDAB, WORK)
SLANTB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a triangular band matrix.
real function sasum(N, SX, INCX)
SASUM
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real b(3) integer i
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
logical function lsame(CA, CB)
LSAME
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
real function slamch(CMACH)
SLAMCH
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
subroutine stbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
STBMV