115 REAL FUNCTION slansp( NORM, UPLO, N, AP, WORK )
127 REAL AP( * ), WORK( * )
134 parameter ( one = 1.0e+0, zero = 0.0e+0 )
138 REAL ABSA, SCALE, SUM, VALUE
144 LOGICAL LSAME, SISNAN
145 EXTERNAL lsame, sisnan
154 ELSE IF( lsame( norm,
'M' ) )
THEN
159 IF( lsame( uplo,
'U' ) )
THEN
162 DO 10 i = k, k + j - 1
164 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
171 DO 30 i = k, k + n - j
173 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
178 ELSE IF( ( lsame( norm,
'I' ) ) .OR. ( lsame( norm,
'O' ) ) .OR.
179 $ ( norm.EQ.
'1' ) )
THEN
185 IF( lsame( uplo,
'U' ) )
THEN
189 absa = abs( ap( k ) )
191 work( i ) = work( i ) + absa
194 work( j ) = sum + abs( ap( k ) )
199 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
206 sum = work( j ) + abs( ap( k ) )
209 absa = abs( ap( k ) )
211 work( i ) = work( i ) + absa
214 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
217 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
224 IF( lsame( uplo,
'U' ) )
THEN
226 CALL slassq( j-1, ap( k ), 1, scale, sum )
231 CALL slassq( n-j, ap( k ), 1, scale, sum )
238 IF( ap( k ).NE.zero )
THEN
239 absa = abs( ap( k ) )
240 IF( scale.LT.absa )
THEN
241 sum = one + sum*( scale / absa )**2
244 sum = sum + ( absa / scale )**2
247 IF( lsame( uplo,
'U' ) )
THEN
253 VALUE = scale*sqrt( sum )
subroutine slassq(N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.
real function slansp(NORM, UPLO, N, AP, WORK)
SLANSP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a symmetric matrix supplied in packed form.