126 SUBROUTINE ctpcon( NORM, UPLO, DIAG, N, AP, RCOND, WORK, RWORK,
134 CHARACTER DIAG, NORM, UPLO
140 COMPLEX AP( * ), WORK( * )
147 parameter( one = 1.0e+0, zero = 0.0e+0 )
150 LOGICAL NOUNIT, ONENRM, UPPER
152 INTEGER IX, KASE, KASE1
153 REAL AINVNM, ANORM, SCALE, SMLNUM, XNORM
163 EXTERNAL lsame, icamax, clantp, slamch
169 INTRINSIC abs, aimag, max, real
175 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
182 upper = lsame( uplo,
'U' )
183 onenrm = norm.EQ.
'1' .OR. lsame( norm,
'O' )
184 nounit = lsame( diag,
'N' )
186 IF( .NOT.onenrm .AND. .NOT.lsame( norm,
'I' ) )
THEN
188 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
190 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
192 ELSE IF( n.LT.0 )
THEN
196 CALL xerbla(
'CTPCON', -info )
208 smlnum = slamch(
'Safe minimum' )*real( max( 1, n ) )
212 anorm = clantp( norm, uplo, diag, n, ap, rwork )
216 IF( anorm.GT.zero )
THEN
229 CALL clacn2( n, work( n+1 ), work, ainvnm, kase, isave )
231 IF( kase.EQ.kase1 )
THEN
235 CALL clatps( uplo,
'No transpose', diag, normin, n,
237 $ work, scale, rwork, info )
242 CALL clatps( uplo,
'Conjugate transpose', diag,
244 $ n, ap, work, scale, rwork, info )
250 IF( scale.NE.one )
THEN
251 ix = icamax( n, work, 1 )
252 xnorm = cabs1( work( ix ) )
253 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
255 CALL csrscl( n, scale, work, 1 )
263 $ rcond = ( one / anorm ) / ainvnm
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 clatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
CLATPS solves a triangular system of equations with the matrix held in packed storage.
subroutine csrscl(n, sa, sx, incx)
CSRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine ctpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info)
CTPCON