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
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
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