161 SUBROUTINE ctbt02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
162 $ ldx,
b, ldb, work, rwork, resid )
170 CHARACTER diag, trans, uplo
171 INTEGER kd, ldab, ldb, ldx, n, nrhs
176 COMPLEX ab( ldab, * ),
b( ldb, * ), work( * ),
184 parameter( zero = 0.0e+0, one = 1.0e+0 )
188 REAL anorm, bnorm, eps, xnorm
205 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
212 IF(
lsame( trans,
'N' ) )
THEN
213 anorm =
clantb(
'1', uplo, diag, n, kd, ab, ldab, rwork )
215 anorm =
clantb(
'I', uplo, diag, n, kd, ab, ldab, rwork )
221 IF( anorm.LE.zero )
THEN
231 CALL
ccopy( n, x( 1,
j ), 1, work, 1 )
232 CALL
ctbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
233 CALL
caxpy( n, cmplx( -one ),
b( 1,
j ), 1, work, 1 )
234 bnorm =
scasum( n, work, 1 )
235 xnorm =
scasum( n, x( 1,
j ), 1 )
236 IF( xnorm.LE.zero )
THEN
239 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
real function clantb(NORM, UPLO, DIAG, N, K, AB, LDAB, WORK)
CLANTB 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.
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
real function scasum(N, CX, INCX)
SCASUM
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real b(3) integer i
logical function lsame(CA, CB)
LSAME
real function slamch(CMACH)
SLAMCH
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
subroutine ctbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
CTBMV
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine ctbt02(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X, LDX, B, LDB, WORK, RWORK, RESID)
CTBT02