128 SUBROUTINE ztpcon( NORM, UPLO, DIAG, N, AP, RCOND, WORK, RWORK,
136 CHARACTER DIAG, NORM, UPLO
138 DOUBLE PRECISION RCOND
141 DOUBLE PRECISION RWORK( * )
142 COMPLEX*16 AP( * ), WORK( * )
148 DOUBLE PRECISION ONE, ZERO
149 parameter( one = 1.0d+0, zero = 0.0d+0 )
152 LOGICAL NOUNIT, ONENRM, UPPER
154 INTEGER IX, KASE, KASE1
155 DOUBLE PRECISION AINVNM, ANORM, SCALE, SMLNUM, XNORM
164 DOUBLE PRECISION DLAMCH, ZLANTP
165 EXTERNAL lsame, izamax, dlamch, zlantp
171 INTRINSIC abs, dble, dimag, max
174 DOUBLE PRECISION CABS1
177 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
184 upper = lsame( uplo,
'U' )
185 onenrm = norm.EQ.
'1' .OR. lsame( norm,
'O' )
186 nounit = lsame( diag,
'N' )
188 IF( .NOT.onenrm .AND. .NOT.lsame( norm,
'I' ) )
THEN
190 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
192 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
194 ELSE IF( n.LT.0 )
THEN
198 CALL xerbla(
'ZTPCON', -info )
210 smlnum = dlamch(
'Safe minimum' )*dble( max( 1, n ) )
214 anorm = zlantp( norm, uplo, diag, n, ap, rwork )
218 IF( anorm.GT.zero )
THEN
231 CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
233 IF( kase.EQ.kase1 )
THEN
237 CALL zlatps( uplo,
'No transpose', diag, normin, n, ap,
238 $ work, scale, rwork, info )
243 CALL zlatps( uplo,
'Conjugate transpose', diag, normin,
244 $ n, ap, work, scale, rwork, info )
250 IF( scale.NE.one )
THEN
251 ix = izamax( n, work, 1 )
252 xnorm = cabs1( work( ix ) )
253 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
255 CALL zdrscl( n, scale, work, 1 )
263 $ 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 zlatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
ZLATPS solves a triangular system of equations with the matrix held in packed storage.
subroutine zdrscl(n, sa, sx, incx)
ZDRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine ztpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info)
ZTPCON