114 REAL function
clansp( norm, uplo, n, ap, work )
133 parameter( one = 1.0e+0, zero = 0.0e+0 )
137 REAL absa, scale, sum, value
147 INTRINSIC abs, aimag, real, sqrt
153 ELSE IF(
lsame( norm,
'M' ) )
THEN
158 IF(
lsame( uplo,
'U' ) )
THEN
161 DO 10 i = k, k + j - 1
163 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
170 DO 30 i = k, k + n - j
172 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
177 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
178 $ ( norm.EQ.
'1' ) )
THEN
184 IF(
lsame( uplo,
'U' ) )
THEN
188 absa = abs( ap( k ) )
190 work( i ) = work( i ) + absa
193 work( j ) = sum + abs( ap( k ) )
198 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
205 sum = work( j ) + abs( ap( k ) )
208 absa = abs( ap( k ) )
210 work( i ) = work( i ) + absa
213 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
216 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
223 IF(
lsame( uplo,
'U' ) )
THEN
225 CALL classq( j-1, ap( k ), 1, scale, sum )
230 CALL classq( n-j, ap( k ), 1, scale, sum )
237 IF( real( ap( k ) ).NE.zero )
THEN
238 absa = abs( real( ap( k ) ) )
239 IF( scale.LT.absa )
THEN
240 sum = one + sum*( scale / absa )**2
243 sum = sum + ( absa / scale )**2
246 IF( aimag( ap( k ) ).NE.zero )
THEN
247 absa = abs( aimag( ap( k ) ) )
248 IF( scale.LT.absa )
THEN
249 sum = one + sum*( scale / absa )**2
252 sum = sum + ( absa / scale )**2
255 IF(
lsame( uplo,
'U' ) )
THEN
261 VALUE = scale*sqrt( sum )
logical function sisnan(sin)
SISNAN tests input for NaN.
real function clansp(norm, uplo, n, ap, work)
CLANSP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine classq(n, x, incx, scale, sumsq)
CLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME