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
192 REAL CLANTB, SCASUM, SLAMCH
193 EXTERNAL lsame, clantb, scasum, slamch
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 )
220 eps = slamch(
'Epsilon' )
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 )
subroutine ctbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
CTBMV
subroutine ctbt02(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X, LDX, B, LDB, WORK, RWORK, RESID)
CTBT02
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY