143 SUBROUTINE stbcon( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
152 CHARACTER DIAG, NORM, UPLO
153 INTEGER INFO, KD, LDAB, N
158 REAL AB( ldab, * ), WORK( * )
165 parameter ( one = 1.0e+0, zero = 0.0e+0 )
168 LOGICAL NOUNIT, ONENRM, UPPER
170 INTEGER IX, KASE, KASE1
171 REAL AINVNM, ANORM, SCALE, SMLNUM, XNORM
180 EXTERNAL lsame, isamax, slamch, slantb
186 INTRINSIC abs, max, real
193 upper = lsame( uplo,
'U' )
194 onenrm = norm.EQ.
'1' .OR. lsame( norm,
'O' )
195 nounit = lsame( diag,
'N' )
197 IF( .NOT.onenrm .AND. .NOT.lsame( norm,
'I' ) )
THEN
199 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
201 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
203 ELSE IF( n.LT.0 )
THEN
205 ELSE IF( kd.LT.0 )
THEN
207 ELSE IF( ldab.LT.kd+1 )
THEN
211 CALL xerbla(
'STBCON', -info )
223 smlnum = slamch(
'Safe minimum' )*
REAL( MAX( 1, N ) )
227 anorm = slantb( norm, uplo, diag, n, kd, ab, ldab, work )
231 IF( anorm.GT.zero )
THEN
244 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
246 IF( kase.EQ.kase1 )
THEN
250 CALL slatbs( uplo,
'No transpose', diag, normin, n, kd,
251 $ ab, ldab, work, scale, work( 2*n+1 ), info )
256 CALL slatbs( uplo,
'Transpose', diag, normin, n, kd, ab,
257 $ ldab, work, scale, work( 2*n+1 ), info )
263 IF( scale.NE.one )
THEN
264 ix = isamax( n, work, 1 )
265 xnorm = abs( work( ix ) )
266 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
268 CALL srscl( n, scale, work, 1 )
276 $ rcond = ( one / anorm ) / ainvnm
subroutine srscl(N, SA, SX, INCX)
SRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine stbcon(NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK, IWORK, INFO)
STBCON
subroutine xerbla(SRNAME, INFO)
XERBLA
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 slatbs(UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X, SCALE, CNORM, INFO)
SLATBS solves a triangular banded system of equations.