135 SUBROUTINE ctrcon( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
143 CHARACTER DIAG, NORM, UPLO
149 COMPLEX A( LDA, * ), WORK( * )
156 parameter( one = 1.0e+0, zero = 0.0e+0 )
159 LOGICAL NOUNIT, ONENRM, UPPER
161 INTEGER IX, KASE, KASE1
162 REAL AINVNM, , SCALE, SMLNUM, XNORM
172 EXTERNAL lsame, icamax, clantr, slamch
178 INTRINSIC abs, aimag,
max, real
184 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( 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.NOT..AND..NOT.
ELSE IF( UPPER LSAME( UPLO, 'l
' ) ) THEN
199.NOT..AND..NOT.
ELSE IF( NOUNIT LSAME( DIAG, 'u
' ) ) THEN
201.LT.
ELSE IF( N0 ) THEN
203.LT.
ELSE IF( LDAMAX( 1, N ) ) THEN
207 CALL XERBLA( 'ctrcon', -INFO )
219 SMLNUM = SLAMCH( 'safe minimum
' )*REAL( MAX( 1, N ) )
223 ANORM = CLANTR( NORM, UPLO, DIAG, N, N, A, LDA, RWORK )
227.GT.
IF( ANORMZERO ) THEN
240 CALL CLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
242.EQ.
IF( KASEKASE1 ) THEN
246 CALL CLATRS( UPLO, 'no transpose
', DIAG, NORMIN, N, A,
247 $ LDA, WORK, SCALE, RWORK, INFO )
252 CALL CLATRS( UPLO, 'conjugate transpose
', DIAG, NORMIN,
253 $ N, A, LDA, WORK, SCALE, RWORK, INFO )
259.NE.
IF( SCALEONE ) THEN
260 IX = ICAMAX( N, WORK, 1 )
261 XNORM = CABS1( WORK( IX ) )
262.LT..OR..EQ.
IF( SCALEXNORM*SMLNUM SCALEZERO )
264 CALL CSRSCL( N, SCALE, WORK, 1 )
272 $ RCOND = ( ONE / ANORM ) / AINVNM
subroutine xerbla(srname, info)
XERBLA
subroutine csrscl(n, sa, sx, incx)
CSRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine clatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info)
CLATRS solves a triangular system of equations with the scale factor set to prevent overflow.
subroutine clacn2(n, v, x, est, kase, isave)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine ctrcon(norm, uplo, diag, n, a, lda, rcond, work, rwork, info)
CTRCON