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
174 DOUBLE PRECISION DLAMCH, ZLANTR
175 EXTERNAL lsame, izamax, dlamch, zlantr
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
263 ix = izamax( n, work, 1 )
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
subroutine zdrscl(N, SA, SX, INCX)
ZDRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zlacn2(N, V, X, EST, KASE, ISAVE)
ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine ztrcon(NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK, RWORK, INFO)
ZTRCON
subroutine zlatrs(UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, CNORM, INFO)
ZLATRS solves a triangular system of equations with the scale factor set to prevent overflow...