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