174 SUBROUTINE ctbt03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
175 $ SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
183 CHARACTER DIAG, TRANS, UPLO
184 INTEGER KD, LDAB, LDB, LDX, N, NRHS
185 REAL RESID, SCALE, TSCAL
189 COMPLEX AB( LDAB, * ), B( LDB, * ), WORK( * ),
198 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
202 REAL EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
208 EXTERNAL lsame, icamax, slamch
214 INTRINSIC abs, cmplx, max, real
220 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
224 eps = slamch(
'Epsilon' )
225 smlnum = slamch(
'Safe minimum' )
231 IF( lsame( diag,
'N' ) )
THEN
232 IF( lsame( uplo,
'U' ) )
THEN
234 tnorm = max( tnorm, tscal*abs( ab( kd+1, j ) )+
239 tnorm = max( tnorm, tscal*abs( ab( 1, j ) )+cnorm( j ) )
244 tnorm = max( tnorm, tscal+cnorm( j ) )
253 CALL ccopy( n, x( 1, j ), 1, work, 1 )
254 ix = icamax( n, work, 1 )
255 xnorm = max( one, abs( x( ix, j ) ) )
256 xscal = ( one / xnorm ) / real( kd+1 )
257 CALL csscal( n, xscal, work, 1 )
258 CALL ctbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
259 CALL caxpy( n, cmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
260 ix = icamax( n, work, 1 )
261 err = tscal*abs( work( ix ) )
262 ix = icamax( n, x( 1, j ), 1 )
263 xnorm = abs( x( ix, j ) )
264 IF( err*smlnum.LE.xnorm )
THEN
271 IF( err*smlnum.LE.tnorm )
THEN
278 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 caxpy(n, ca, cx, incx, cy, incy)
CAXPY
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine csscal(n, sa, cx, incx)
CSSCAL
subroutine ctbmv(uplo, trans, diag, n, k, a, lda, x, incx)
CTBMV