176 SUBROUTINE ztbt03( 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 DOUBLE PRECISION RESID, SCALE, TSCAL
191 DOUBLE PRECISION CNORM( * )
192 COMPLEX*16 AB( ldab, * ), B( ldb, * ), WORK( * ),
200 DOUBLE PRECISION ONE, ZERO
201 parameter ( one = 1.0d+0, zero = 0.0d+0 )
205 DOUBLE PRECISION EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
210 DOUBLE PRECISION DLAMCH
211 EXTERNAL lsame, izamax, dlamch
217 INTRINSIC abs, dble, dcmplx, max
223 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
227 eps = dlamch(
'Epsilon' )
228 smlnum = dlamch(
'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 zcopy( n, x( 1, j ), 1, work, 1 )
257 ix = izamax( n, work, 1 )
258 xnorm = max( one, abs( x( ix, j ) ) )
259 xscal = ( one / xnorm ) / dble( kd+1 )
260 CALL zdscal( n, xscal, work, 1 )
261 CALL ztbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
262 CALL zaxpy( n, dcmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
263 ix = izamax( n, work, 1 )
264 err = tscal*abs( work( ix ) )
265 ix = izamax( 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 zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
subroutine ztbmv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
ZTBMV
subroutine ztbt03(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID)
ZTBT03
subroutine zdscal(N, DA, ZX, INCX)
ZDSCAL
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY