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
171 sum = abs(
REAL( AP( K ) ) )
177 sum = abs(
REAL( AP( K ) ) )
179 DO 30 i = k + 1, k + n -
j
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 ) ) )
214 sum = work(
j ) + abs(
REAL( AP( K ) ) )
217 absa = abs( ap( k ) )
219 work( i ) = work( i ) + absa
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 )
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.
input scalars passed by value
logical function lsame(CA, CB)
LSAME
subroutine classq(N, X, INCX, SCALE, SUMSQ)
CLASSQ updates a sum of squares represented in scaled form.
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
logical function sisnan(SIN)
SISNAN tests input for NaN.