135 SUBROUTINE ztrcon( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
143 CHARACTER DIAG, NORM, UPLO
145 DOUBLE PRECISION RCOND
148 DOUBLE PRECISION RWORK( * )
149 COMPLEX*16 A( LDA, * ), WORK( * )
155 DOUBLE PRECISION ONE, ZERO
156 parameter( one = 1.0d+0, zero = 0.0d+0 )
159 LOGICAL NOUNIT, ONENRM, UPPER
161 INTEGER IX, KASE, KASE1
162 DOUBLE PRECISION AINVNM, ANORM, SCALE, SMLNUM, XNORM
171 DOUBLE PRECISION DLAMCH, ZLANTR
172 EXTERNAL lsame, izamax, dlamch, zlantr
178 INTRINSIC abs, dble, dimag, max
181 DOUBLE PRECISION CABS1
184 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
191 upper = lsame( uplo,
'U' )
192 onenrm = norm.EQ.
'1' .OR. lsame( norm,
'O' )
193 nounit = lsame( diag,
'N' )
195 IF( .NOT.onenrm .AND. .NOT.lsame( norm,
'I' ) )
THEN
197 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
199 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
201 ELSE IF( n.LT.0 )
THEN
203 ELSE IF( lda.LT.max( 1, n ) )
THEN
207 CALL xerbla(
'ZTRCON', -info )
219 smlnum = dlamch(
'Safe minimum' )*dble( max( 1, n ) )
223 anorm = zlantr( norm, uplo, diag, n, n, a, lda, rwork )
227 IF( anorm.GT.zero )
THEN
240 CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
242 IF( kase.EQ.kase1 )
THEN
246 CALL zlatrs( uplo,
'No transpose', diag, normin, n, a,
247 $ lda, work, scale, rwork, info )
252 CALL zlatrs( uplo,
'Conjugate transpose', diag, normin,
253 $ n, a, lda, work, scale, rwork, info )
259 IF( scale.NE.one )
THEN
260 ix = izamax( n, work, 1 )
261 xnorm = cabs1( work( ix ) )
262 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
264 CALL zdrscl( n, scale, work, 1 )
272 $ rcond = ( one / anorm ) / ainvnm
subroutine xerbla(srname, info)
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 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.
subroutine zdrscl(n, sa, sx, incx)
ZDRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine ztrcon(norm, uplo, diag, n, a, lda, rcond, work, rwork, info)
ZTRCON