137 SUBROUTINE ztrcon( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
146 CHARACTER diag, norm, uplo
148 DOUBLE PRECISION rcond
151 DOUBLE PRECISION rwork( * )
152 COMPLEX*16 a( lda, * ), work( * )
158 DOUBLE PRECISION one, zero
159 parameter( one = 1.0d+0, zero = 0.0d+0 )
162 LOGICAL nounit, onenrm, upper
164 INTEGER ix, kase, kase1
165 DOUBLE PRECISION ainvnm, anorm, scale, smlnum, xnorm
181 INTRINSIC abs, dble, dimag, max
184 DOUBLE PRECISION cabs1
187 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
194 upper =
lsame( uplo,
'U' )
195 onenrm = norm.EQ.
'1' .OR.
lsame( norm,
'O' )
196 nounit =
lsame( diag,
'N' )
198 IF( .NOT.onenrm .AND. .NOT.
lsame( norm,
'I' ) )
THEN
200 ELSE IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
202 ELSE IF( .NOT.nounit .AND. .NOT.
lsame( diag,
'U' ) )
THEN
204 ELSE IF( n.LT.0 )
THEN
206 ELSE IF( lda.LT.max( 1, n ) )
THEN
210 CALL
xerbla(
'ZTRCON', -info )
222 smlnum =
dlamch(
'Safe minimum' )*dble( max( 1, n ) )
226 anorm =
zlantr( norm, uplo, diag, n, n, a, lda, rwork )
230 IF( anorm.GT.zero )
THEN
243 CALL
zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
245 IF( kase.EQ.kase1 )
THEN
249 CALL
zlatrs( uplo,
'No transpose', diag, normin, n, a,
250 $ lda, work, scale, rwork, info )
255 CALL
zlatrs( uplo,
'Conjugate transpose', diag, normin,
256 $ n, a, lda, work, scale, rwork, info )
262 IF( scale.NE.one )
THEN
264 xnorm = cabs1( work( ix ) )
265 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
267 CALL
zdrscl( n, scale, work, 1 )
275 $ rcond = ( one / anorm ) / ainvnm