123 DOUBLE PRECISION FUNCTION zlanhe( NORM, UPLO, N, A, LDA, WORK )
134 DOUBLE PRECISION work( * )
135 COMPLEX*16 a( lda, * )
141 DOUBLE PRECISION one, zero
142 parameter( one = 1.0d+0, zero = 0.0d+0 )
146 DOUBLE PRECISION absa, scale, sum, value
156 INTRINSIC abs, dble, sqrt
162 ELSE IF(
lsame( norm,
'M' ) )
THEN
167 IF(
lsame( uplo,
'U' ) )
THEN
170 sum = abs( a( i, j ) )
171 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
173 sum = abs( dble( a( j, j ) ) )
174 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
178 sum = abs( dble( a( j, j ) ) )
179 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
181 sum = abs( a( i, j ) )
182 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
186 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
187 $ ( norm.EQ.
'1' ) )
THEN
192 IF(
lsame( uplo,
'U' ) )
THEN
196 absa = abs( a( i, j ) )
198 work( i ) = work( i ) + absa
200 work( j ) = sum + abs( dble( a( j, j ) ) )
204 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
211 sum = work( j ) + abs( dble( a( j, j ) ) )
213 absa = abs( a( i, j ) )
215 work( i ) = work( i ) + absa
217 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
220 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
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 )
logical function disnan(din)
DISNAN tests input for NaN.
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.
logical function lsame(ca, cb)
LSAME