123 REAL function
clanhe( norm, uplo, n, a, lda, work )
142 parameter( one = 1.0e+0, zero = 0.0e+0 )
146 REAL absa, scale, sum, value
156 INTRINSIC abs, real, sqrt
162 ELSE IF(
lsame( norm,
'M' ) )
THEN
167 IF(
lsame( uplo,
'U' ) )
THEN
170 sum = abs( a( i, j ) )
171 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
173 sum = abs( real( a( j, j ) ) )
174 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
178 sum = abs( real( a( j, j ) ) )
179 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
181 sum = abs( a( i, j ) )
182 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
192 IF(
lsame( uplo,
'U' ) )
THEN
196 absa = abs( a( i, j ) )
198 work( i ) = work( i ) + absa
200 work( j ) = sum + abs( real( a( j, j ) ) )
204 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
211 sum = work( j ) + abs( real( a( j, j ) ) )
213 absa = abs( a( i, j ) )
215 work( i ) = work( i ) + absa
217 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
220 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
226 IF(
lsame( uplo,
'U' ) )
THEN
228 CALL classq( j-1, a( 1, j ), 1, scale, sum )
232 CALL classq( n-j, a( j+1, j ), 1, scale, sum )
237 IF( real( a( i, i ) ).NE.zero )
THEN
238 absa = abs( real( a( i, i ) ) )
239 IF( scale.LT.absa )
THEN
240 sum = one + sum*( scale / absa )**2
243 sum = sum + ( absa / scale )**2
247 VALUE = scale*sqrt( sum )
logical function sisnan(sin)
SISNAN tests input for NaN.
real function clanhe(norm, uplo, n, a, lda, work)
CLANHE returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine classq(n, x, incx, scale, sumsq)
CLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME