124 SUBROUTINE sgecon( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
139 REAL a( lda, * ), work( * )
146 parameter( one = 1.0e+0, zero = 0.0e+0 )
151 INTEGER ix, kase, kase1
152 REAL ainvnm, scale, sl, smlnum, su
174 onenrm = norm.EQ.
'1' .OR.
lsame( norm,
'O' )
175 IF( .NOT.onenrm .AND. .NOT.
lsame( norm,
'I' ) )
THEN
177 ELSE IF( n.LT.0 )
THEN
179 ELSE IF( lda.LT.max( 1, n ) )
THEN
181 ELSE IF( anorm.LT.zero )
THEN
185 CALL
xerbla(
'SGECON', -info )
195 ELSE IF( anorm.EQ.zero )
THEN
199 smlnum =
slamch(
'Safe minimum' )
212 CALL
slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
214 IF( kase.EQ.kase1 )
THEN
218 CALL
slatrs(
'Lower',
'No transpose',
'Unit', normin, n, a,
219 $ lda, work, sl, work( 2*n+1 ), info )
223 CALL
slatrs(
'Upper',
'No transpose',
'Non-unit', normin, n,
224 $ a, lda, work, su, work( 3*n+1 ), info )
229 CALL
slatrs(
'Upper',
'Transpose',
'Non-unit', normin, n, a,
230 $ lda, work, su, work( 3*n+1 ), info )
234 CALL
slatrs(
'Lower',
'Transpose',
'Unit', normin, n, a,
235 $ lda, work, sl, work( 2*n+1 ), info )
242 IF( scale.NE.one )
THEN
244 IF( scale.LT.abs( work( ix ) )*smlnum .OR. scale.EQ.zero )
246 CALL
srscl( n, scale, work, 1 )
254 $ rcond = ( one / ainvnm ) / anorm