113 DOUBLE PRECISION FUNCTION dlansp( NORM, UPLO, N, AP, WORK )
124 DOUBLE PRECISION ap( * ), work( * )
130 DOUBLE PRECISION one, zero
131 parameter( one = 1.0d+0, zero = 0.0d+0 )
135 DOUBLE PRECISION absa, scale, sum, value
151 ELSE IF(
lsame( norm,
'M' ) )
THEN
156 IF(
lsame( uplo,
'U' ) )
THEN
159 DO 10 i = k, k + j - 1
161 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
168 DO 30 i = k, k + n - j
170 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
175 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
176 $ ( norm.EQ.
'1' ) )
THEN
182 IF(
lsame( uplo,
'U' ) )
THEN
186 absa = abs( ap( k ) )
188 work( i ) = work( i ) + absa
191 work( j ) = sum + abs( ap( k ) )
196 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
203 sum = work( j ) + abs( ap( k ) )
206 absa = abs( ap( k ) )
208 work( i ) = work( i ) + absa
211 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
214 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
221 IF(
lsame( uplo,
'U' ) )
THEN
223 CALL dlassq( j-1, ap( k ), 1, scale, sum )
228 CALL dlassq( n-j, ap( k ), 1, scale, sum )
235 IF( ap( k ).NE.zero )
THEN
236 absa = abs( ap( k ) )
237 IF( scale.LT.absa )
THEN
238 sum = one + sum*( scale / absa )**2
241 sum = sum + ( absa / scale )**2
244 IF(
lsame( uplo,
'U' ) )
THEN
250 VALUE = scale*sqrt( sum )
logical function disnan(din)
DISNAN tests input for NaN.
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,...
subroutine dlassq(n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME