157 SUBROUTINE ztbt02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
158 $ LDX, B, LDB, WORK, RWORK, RESID )
165 CHARACTER DIAG, TRANS, UPLO
166 INTEGER KD, LDAB, LDB, LDX, N, NRHS
167 DOUBLE PRECISION RESID
170 DOUBLE PRECISION RWORK( * )
171 COMPLEX*16 AB( LDAB, * ), B( LDB, * ), WORK( * ),
178 DOUBLE PRECISION ZERO, ONE
179 parameter( zero = 0.0d+0, one = 1.0d+0 )
183 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
187 DOUBLE PRECISION DLAMCH, DZASUM, ZLANTB
188 EXTERNAL lsame, dlamch, dzasum, zlantb
194 INTRINSIC dcmplx, max
200 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
207 IF( lsame( trans,
'N' ) )
THEN
208 anorm = zlantb(
'1', uplo, diag, n, kd, ab, ldab, rwork )
210 anorm = zlantb(
'I', uplo, diag, n, kd, ab, ldab, rwork )
215 eps = dlamch(
'Epsilon' )
216 IF( anorm.LE.zero )
THEN
226 CALL zcopy( n, x( 1, j ), 1, work, 1 )
227 CALL ztbmv( uplo, trans, diag, n, kd, ab, ldab, work, 1 )
228 CALL zaxpy( n, dcmplx( -one ), b( 1, j ), 1, work, 1 )
229 bnorm = dzasum( n, work, 1 )
230 xnorm = dzasum( n, x( 1, j ), 1 )
231 IF( xnorm.LE.zero )
THEN
234 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx)
ZTBMV
subroutine ztbt02(uplo, trans, diag, n, kd, nrhs, ab, ldab, x, ldx, b, ldb, work, rwork, resid)
ZTBT02