121 REAL function
clanhe( norm, uplo, n, a, lda, work )
140 parameter( one = 1.0e+0, zero = 0.0e+0 )
144 REAL absa, scale, sum, value
154 INTRINSIC abs, real, sqrt
160 ELSE IF(
lsame( norm,
'M' ) )
THEN
165 IF(
lsame( uplo,
'U' ) )
THEN
168 sum = abs( a( i, j ) )
169 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
171 sum = abs( real( a( j, j ) ) )
172 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
176 sum = abs( real( a( j, j ) ) )
177 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
179 sum = abs( a( i, j ) )
180 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
184 ELSE IF( (
lsame( norm,
'I' ) ) .OR.
185 $ (
lsame( norm,
'O' ) ) .OR.
186 $ ( norm.EQ.
'1' ) )
THEN
191 IF(
lsame( uplo,
'U' ) )
THEN
195 absa = abs( a( i, j ) )
197 work( i ) = work( i ) + absa
199 work( j ) = sum + abs( real( a( j, j ) ) )
203 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
210 sum = work( j ) + abs( real( a( j, j ) ) )
212 absa = abs( a( i, j ) )
214 work( i ) = work( i ) + absa
216 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
219 ELSE IF( (
lsame( norm,
'F' ) ) .OR.
220 $ (
lsame( norm,
'E' ) ) )
THEN
226 IF(
lsame( uplo,
'U' ) )
THEN
228 CALL classq( j-1, a( 1, j ), 1, scale, sum )
232 CALL classq( n-j, a( j+1, j ), 1, scale, sum )
237 IF( real( a( i, i ) ).NE.zero )
THEN
238 absa = abs( real( a( i, i ) ) )
239 IF( scale.LT.absa )
THEN
240 sum = one + sum*( scale / absa )**2
243 sum = sum + ( absa / scale )**2
247 VALUE = scale*sqrt( sum )
real function clanhe(norm, uplo, n, a, lda, work)
CLANHE 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.