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
145 LOGICAL LSAME, SISNAN
146 EXTERNAL lsame, sisnan
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 )
subroutine classq(N, X, INCX, SCALE, SUMSQ)
CLASSQ updates a sum of squares represented in scaled form.
real function clanhp(NORM, UPLO, N, AP, WORK)
CLANHP 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.