118 REAL FUNCTION clanhp( NORM, UPLO, N, AP, WORK )
138 parameter( one = 1.0e+0, zero = 0.0e+0 )
142 REAL absa, scale, sum, value
152 INTRINSIC abs,
REAL, 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.
sisnan( sum ) ) value = sum
171 sum = abs(
REAL( AP( K ) ) )
172 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
177 sum = abs(
REAL( AP( K ) ) )
178 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
179 DO 30 i = k + 1, k + n - j
181 IF( value .LT. sum .OR.
sisnan( 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(
REAL( AP( K ) ) )
207 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
214 sum = work( j ) + abs(
REAL( AP( K ) ) )
217 absa = abs( ap( k ) )
219 work( i ) = work( i ) + absa
222 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
225 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
232 IF(
lsame( uplo,
'U' ) )
THEN
234 CALL
classq( j-1, ap( k ), 1, scale, sum )
239 CALL
classq( n-j, ap( k ), 1, scale, sum )
246 IF(
REAL( AP( K ) ).NE.zero ) then
247 absa = abs(
REAL( 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 )