128 SUBROUTINE stpcon( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
136 CHARACTER DIAG, NORM, UPLO
142 REAL AP( * ), WORK( * )
149 parameter( one = 1.0e+0, zero = 0.0e+0 )
152 LOGICAL NOUNIT, ONENRM, UPPER
154 INTEGER IX, KASE, KASE1
155 REAL AINVNM, ANORM, SCALE, SMLNUM, XNORM
164 EXTERNAL lsame, isamax, slamch, slantp
170 INTRINSIC abs, max, real
177 upper = lsame( uplo,
'U' )
178 onenrm = norm.EQ.
'1' .OR. lsame( norm,
'O' )
179 nounit = lsame( diag,
'N' )
181 IF( .NOT.onenrm .AND. .NOT.lsame( norm,
'I' ) )
THEN
183 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
185 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
187 ELSE IF( n.LT.0 )
THEN
191 CALL xerbla(
'STPCON', -info )
203 smlnum = slamch(
'Safe minimum' )*real( max( 1, n ) )
207 anorm = slantp( norm, uplo, diag, n, ap, work )
211 IF( anorm.GT.zero )
THEN
224 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
226 IF( kase.EQ.kase1 )
THEN
230 CALL slatps( uplo,
'No transpose', diag, normin, n, ap,
231 $ work, scale, work( 2*n+1 ), info )
236 CALL slatps( uplo,
'Transpose', diag, normin, n, ap,
237 $ work, scale, work( 2*n+1 ), info )
243 IF( scale.NE.one )
THEN
244 ix = isamax( n, work, 1 )
245 xnorm = abs( work( ix ) )
246 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
248 CALL srscl( n, scale, work, 1 )
256 $ rcond = ( one / anorm ) / ainvnm
subroutine xerbla(srname, info)
subroutine slacn2(n, v, x, isgn, est, kase, isave)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine slatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
SLATPS solves a triangular system of equations with the matrix held in packed storage.
subroutine srscl(n, sa, sx, incx)
SRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine stpcon(norm, uplo, diag, n, ap, rcond, work, iwork, info)
STPCON