174 SUBROUTINE ztbt03( 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 DOUBLE PRECISION RESID, SCALE, TSCAL
188 DOUBLE PRECISION CNORM( * )
189 COMPLEX*16 AB( LDAB, * ), B( LDB, * ), WORK( * ),
197 DOUBLE PRECISION ONE, ZERO
198 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
202 DOUBLE PRECISION EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
207 DOUBLE PRECISION DLAMCH
208 EXTERNAL lsame, izamax, dlamch
214 INTRINSIC abs, dble, dcmplx, max
220 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
224 eps = dlamch(
'Epsilon' )
225 smlnum = dlamch(
'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 zcopy( n, x( 1, j ), 1, work, 1 )
254 ix = izamax( n, work, 1 )
255 xnorm = max( one, abs( x( ix, j ) ) )
256 xscal = ( one / xnorm ) / dble( kd+1 )
257 CALL zdscal( n, xscal, work, 1 )
258 CALL ztbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
259 CALL zaxpy( n, dcmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
260 ix = izamax( n, work, 1 )
261 err = tscal*abs( work( ix ) )
262 ix = izamax( 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 zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zdscal(n, da, zx, incx)
ZDSCAL
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