176 SUBROUTINE ctbt03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
177 $ scale, cnorm, tscal, x, ldx, b, ldb, work,
186 CHARACTER DIAG, TRANS, UPLO
187 INTEGER KD, LDAB, LDB, LDX, N, NRHS
188 REAL RESID, SCALE, TSCAL
192 COMPLEX AB( ldab, * ), B( ldb, * ), WORK( * ),
201 parameter ( one = 1.0e+0, zero = 0.0e+0 )
205 REAL EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
211 EXTERNAL lsame, icamax, slamch
217 INTRINSIC abs, cmplx, max, real
223 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
227 eps = slamch(
'Epsilon' )
228 smlnum = slamch(
'Safe minimum' )
234 IF( lsame( diag,
'N' ) )
THEN
235 IF( lsame( uplo,
'U' ) )
THEN
237 tnorm = max( tnorm, tscal*abs( ab( kd+1, j ) )+
242 tnorm = max( tnorm, tscal*abs( ab( 1, j ) )+cnorm( j ) )
247 tnorm = max( tnorm, tscal+cnorm( j ) )
256 CALL ccopy( n, x( 1, j ), 1, work, 1 )
257 ix = icamax( n, work, 1 )
258 xnorm = max( one, abs( x( ix, j ) ) )
259 xscal = ( one / xnorm ) /
REAL( kd+1 )
260 CALL csscal( n, xscal, work, 1 )
261 CALL ctbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
262 CALL caxpy( n, cmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
263 ix = icamax( n, work, 1 )
264 err = tscal*abs( work( ix ) )
265 ix = icamax( n, x( 1, j ), 1 )
266 xnorm = abs( x( ix, j ) )
267 IF( err*smlnum.LE.xnorm )
THEN
274 IF( err*smlnum.LE.tnorm )
THEN
281 resid = max( resid, err )
subroutine ctbt03(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID)
CTBT03
subroutine ctbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
CTBMV
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
subroutine csscal(N, SA, CX, INCX)
CSSCAL