144 REAL function
sla_syrcond( uplo, n, a, lda, af, ldaf, ipiv, cmode,
145 $ c, info, work, iwork )
153 INTEGER n, lda, ldaf, info, cmode
156 INTEGER iwork( * ), ipiv( * )
157 REAL a( lda, * ), af( ldaf, * ), work( * ), c( * )
165 REAL ainvnm, smlnum, tmp
189 ELSE IF( lda.LT.max( 1, n ) )
THEN
191 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
195 CALL xerbla(
'SLA_SYRCOND', -info )
203 IF (
lsame( uplo,
'U' ) ) up = .true.
211 IF ( cmode .EQ. 1 )
THEN
213 tmp = tmp + abs( a( j, i ) * c( j ) )
216 tmp = tmp + abs( a( i, j ) * c( j ) )
218 ELSE IF ( cmode .EQ. 0 )
THEN
220 tmp = tmp + abs( a( j, i ) )
223 tmp = tmp + abs( a( i, j ) )
227 tmp = tmp + abs( a( j, i ) / c( j ) )
230 tmp = tmp + abs( a( i, j ) / c( j ) )
238 IF ( cmode .EQ. 1 )
THEN
240 tmp = tmp + abs( a( i, j ) * c( j ) )
243 tmp = tmp + abs( a( j, i ) * c( j ) )
245 ELSE IF ( cmode .EQ. 0 )
THEN
247 tmp = tmp + abs( a( i, j ) )
250 tmp = tmp + abs( a( j, i ) )
254 tmp = tmp + abs( a( i, j) / c( j ) )
257 tmp = tmp + abs( a( j, i) / c( j ) )
266 smlnum =
slamch(
'Safe minimum' )
272 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
279 work( i ) = work( i ) * work( 2*n+i )
283 CALL ssytrs(
'U', n, 1, af, ldaf, ipiv, work, n, info )
285 CALL ssytrs(
'L', n, 1, af, ldaf, ipiv, work, n, info )
290 IF ( cmode .EQ. 1 )
THEN
292 work( i ) = work( i ) / c( i )
294 ELSE IF ( cmode .EQ. -1 )
THEN
296 work( i ) = work( i ) * c( i )
303 IF ( cmode .EQ. 1 )
THEN
305 work( i ) = work( i ) / c( i )
307 ELSE IF ( cmode .EQ. -1 )
THEN
309 work( i ) = work( i ) * c( i )
314 CALL ssytrs(
'U', n, 1, af, ldaf, ipiv, work, n, info )
316 CALL ssytrs(
'L', n, 1, af, ldaf, ipiv, work, n, info )
322 work( i ) = work( i ) * work( 2*n+i )
331 IF( ainvnm .NE. 0.0 )
subroutine xerbla(srname, info)
subroutine ssytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
SSYTRS
real function sla_syrcond(uplo, n, a, lda, af, ldaf, ipiv, cmode, c, info, work, iwork)
SLA_SYRCOND estimates the Skeel condition number for a symmetric indefinite matrix.
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...
real function slamch(cmach)
SLAMCH
logical function lsame(ca, cb)
LSAME