115 DOUBLE PRECISION FUNCTION dlansp( NORM, UPLO, N, AP, WORK )
127 DOUBLE PRECISION AP( * ), WORK( * )
133 DOUBLE PRECISION ONE, ZERO
134 parameter ( one = 1.0d+0, zero = 0.0d+0 )
138 DOUBLE PRECISION ABSA, SCALE, SUM, VALUE
144 LOGICAL LSAME, DISNAN
145 EXTERNAL lsame, disnan
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. disnan( sum ) )
VALUE = sum
171 DO 30 i = k, k + n - j
173 IF(
VALUE .LT. sum .OR. disnan( 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. disnan( 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. disnan( sum ) )
VALUE = sum
217 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
224 IF( lsame( uplo,
'U' ) )
THEN
226 CALL dlassq( j-1, ap( k ), 1, scale, sum )
231 CALL dlassq( 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 dlassq(N, X, INCX, SCALE, SUMSQ)
DLASSQ updates a sum of squares represented in scaled form.
double precision function dlansp(NORM, UPLO, N, AP, WORK)
DLANSP 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.