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
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 )