118 DOUBLE PRECISION FUNCTION zlanhp( NORM, UPLO, N, AP, WORK )
130 DOUBLE PRECISION WORK( * )
137 DOUBLE PRECISION ONE, ZERO
138 parameter ( one = 1.0d+0, zero = 0.0d+0 )
142 DOUBLE PRECISION ABSA, SCALE, SUM, VALUE
145 LOGICAL LSAME, DISNAN
146 EXTERNAL lsame, disnan
152 INTRINSIC abs, dble, sqrt
158 ELSE IF( lsame( norm,
'M' ) )
THEN
163 IF( lsame( uplo,
'U' ) )
THEN
166 DO 10 i = k + 1, k + j - 1
168 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
171 sum = abs( dble( ap( k ) ) )
172 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
177 sum = abs( dble( ap( k ) ) )
178 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
179 DO 30 i = k + 1, k + n - j
181 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
193 IF( lsame( uplo,
'U' ) )
THEN
197 absa = abs( ap( k ) )
199 work( i ) = work( i ) + absa
202 work( j ) = sum + abs( dble( ap( k ) ) )
207 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
214 sum = work( j ) + abs( dble( ap( k ) ) )
217 absa = abs( ap( k ) )
219 work( i ) = work( i ) + absa
222 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
225 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
232 IF( lsame( uplo,
'U' ) )
THEN
234 CALL zlassq( j-1, ap( k ), 1, scale, sum )
239 CALL zlassq( n-j, ap( k ), 1, scale, sum )
246 IF( dble( ap( k ) ).NE.zero )
THEN
247 absa = abs( dble( ap( k ) ) )
248 IF( scale.LT.absa )
THEN
249 sum = one + sum*( scale / absa )**2
252 sum = sum + ( absa / scale )**2
255 IF( lsame( uplo,
'U' ) )
THEN
261 VALUE = scale*sqrt( sum )
double precision function zlanhp(NORM, UPLO, N, AP, WORK)
ZLANHP 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 supplied in packed form.
subroutine zlassq(N, X, INCX, SCALE, SUMSQ)
ZLASSQ updates a sum of squares represented in scaled form.