121 DOUBLE PRECISION FUNCTION zlanhe( NORM, UPLO, N, A, LDA, WORK )
132 DOUBLE PRECISION work( * )
133 COMPLEX*16 a( lda, * )
139 DOUBLE PRECISION one, zero
140 parameter( one = 1.0d+0, zero = 0.0d+0 )
144 DOUBLE PRECISION absa, scale, sum, value
154 INTRINSIC abs, dble, 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.
disnan( sum ) )
VALUE = sum
171 sum = abs( dble( a( j, j ) ) )
172 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
179 sum = abs( a( i, j ) )
180 IF(
VALUE .LT. sum .OR.
disnan( 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( dble( a( j, j ) ) )
203 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
210 sum = work( j ) + abs( dble( a( j, j ) ) )
212 absa = abs( a( i, j ) )
214 work( i ) = work( i ) + absa
216 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
219 ELSE IF( (
lsame( norm,
'F' ) ) .OR.
220 $ (
lsame( norm,
'E' ) ) )
THEN
226 IF(
lsame( uplo,
'U' ) )
THEN
228 CALL zlassq( j-1, a( 1, j ), 1, scale, sum )
232 CALL zlassq( n-j, a( j+1, j ), 1, scale, sum )
237 IF( dble( a( i, i ) ).NE.zero )
THEN
238 absa = abs( dble( 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 )
double precision function zlanhe(norm, uplo, n, a, lda, work)
ZLANHE returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine zlassq(n, x, incx, scale, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.