125 DOUBLE PRECISION FUNCTION zlanhe( NORM, UPLO, N, A, LDA, WORK )
137 DOUBLE PRECISION work( * )
138 COMPLEX*16 a( lda, * )
144 DOUBLE PRECISION one, zero
145 parameter( one = 1.0d+0, zero = 0.0d+0 )
149 DOUBLE PRECISION absa, scale, sum, value
159 INTRINSIC abs, dble, 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.
disnan( sum ) ) value = sum
176 sum = abs( dble( a( j, j ) ) )
177 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
181 sum = abs( dble( a( j, j ) ) )
182 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
184 sum = abs( a( i, j ) )
185 IF( value .LT. sum .OR.
disnan( 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( dble( a( j, j ) ) )
207 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
214 sum = work( j ) + abs( dble( a( j, j ) ) )
216 absa = abs( a( i, j ) )
218 work( i ) = work( i ) + absa
220 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
223 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
229 IF(
lsame( uplo,
'U' ) )
THEN
231 CALL
zlassq( j-1, a( 1, j ), 1, scale, sum )
235 CALL
zlassq( n-j, a( j+1, j ), 1, scale, sum )
240 IF( dble( a( i, i ) ).NE.zero )
THEN
241 absa = abs( dble( 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 )