143 SUBROUTINE ztbcon( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
152 CHARACTER diag, norm, uplo
153 INTEGER info, kd, ldab, n
154 DOUBLE PRECISION rcond
157 DOUBLE PRECISION rwork( * )
158 COMPLEX*16 ab( ldab, * ), work( * )
164 DOUBLE PRECISION one, zero
165 parameter( one = 1.0d+0, zero = 0.0d+0 )
168 LOGICAL nounit, onenrm, upper
170 INTEGER ix, kase, kase1
171 DOUBLE PRECISION ainvnm, anorm, scale, smlnum, xnorm
187 INTRINSIC abs, dble, dimag, max
190 DOUBLE PRECISION cabs1
193 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
200 upper =
lsame( uplo,
'U' )
201 onenrm = norm.EQ.
'1' .OR.
lsame( norm,
'O' )
202 nounit =
lsame( diag,
'N' )
204 IF( .NOT.onenrm .AND. .NOT.
lsame( norm,
'I' ) )
THEN
206 ELSE IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
208 ELSE IF( .NOT.nounit .AND. .NOT.
lsame( diag,
'U' ) )
THEN
210 ELSE IF( n.LT.0 )
THEN
212 ELSE IF( kd.LT.0 )
THEN
214 ELSE IF( ldab.LT.kd+1 )
THEN
218 CALL
xerbla(
'ZTBCON', -info )
230 smlnum =
dlamch(
'Safe minimum' )*dble( max( n, 1 ) )
234 anorm =
zlantb( norm, uplo, diag, n, kd, ab, ldab, rwork )
238 IF( anorm.GT.zero )
THEN
251 CALL
zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
253 IF( kase.EQ.kase1 )
THEN
257 CALL
zlatbs( uplo,
'No transpose', diag, normin, n, kd,
258 $ ab, ldab, work, scale, rwork, info )
263 CALL
zlatbs( uplo,
'Conjugate transpose', diag, normin,
264 $ n, kd, ab, ldab, work, scale, rwork, info )
270 IF( scale.NE.one )
THEN
272 xnorm = cabs1( work( ix ) )
273 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
275 CALL
zdrscl( n, scale, work, 1 )
283 $ rcond = ( one / anorm ) / ainvnm