125 REAL FUNCTION clanhe( NORM, UPLO, N, A, LDA, WORK )
145 parameter ( one = 1.0e+0, zero = 0.0e+0 )
149 REAL ABSA, SCALE, SUM, VALUE
152 LOGICAL LSAME, SISNAN
153 EXTERNAL lsame, sisnan
159 INTRINSIC abs,
REAL, SQRT
165 ELSE IF( lsame( norm,
'M' ) )
THEN
170 IF( lsame( uplo,
'U' ) )
THEN
173 sum = abs( a( i, j ) )
174 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
181 sum = abs(
REAL( A( J, J ) ) )
182 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
184 sum = abs( a( i, j ) )
185 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
189 ELSE IF( ( lsame( norm,
'I' ) ) .OR. ( lsame( norm,
'O' ) ) .OR.
190 $ ( norm.EQ.
'1' ) )
THEN
195 IF( lsame( uplo,
'U' ) )
THEN
199 absa = abs( a( i, j ) )
201 work( i ) = work( i ) + absa
203 work( j ) = sum + abs(
REAL( A( J, J ) ) )
207 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
214 sum = work( j ) + abs(
REAL( A( J, J ) ) )
216 absa = abs( a( i, j ) )
218 work( i ) = work( i ) + absa
220 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
223 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
229 IF( lsame( uplo,
'U' ) )
THEN
231 CALL classq( j-1, a( 1, j ), 1, scale, sum )
235 CALL classq( n-j, a( j+1, j ), 1, scale, sum )
240 IF(
REAL( A( I, I ) ).NE.zero ) then
241 absa = abs(
REAL( A( I, I ) ) )
242 IF( scale.LT.absa )
THEN
243 sum = one + sum*( scale / absa )**2
246 sum = sum + ( absa / scale )**2
250 VALUE = scale*sqrt( sum )
subroutine classq(N, X, INCX, SCALE, SUMSQ)
CLASSQ updates a sum of squares represented in scaled form.
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, or the element of largest absolute value of a complex Hermitian matrix.