123 REAL function
clanhe( norm, uplo, n, a, lda, work )
143 parameter( one = 1.0e+0, zero = 0.0e+0 )
147 REAL absa, sum, value
150 REAL ssq( 2 ), colssq( 2 )
160 INTRINSIC abs, real, sqrt
166 ELSE IF(
lsame( norm,
'M' ) )
THEN
171 IF(
lsame( uplo,
'U' ) )
THEN
174 sum = abs( a( i, j ) )
175 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
177 sum = abs( real( a( j, j ) ) )
178 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
182 sum = abs( real( a( j, j ) ) )
183 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
185 sum = abs( a( i, j ) )
186 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
190 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
191 $ ( norm.EQ.
'1' ) )
THEN
196 IF(
lsame( uplo,
'U' ) )
THEN
200 absa = abs( a( i, j ) )
202 work( i ) = work( i ) + absa
204 work( j ) = sum + abs( real( a( j, j ) ) )
208 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
215 sum = work( j ) + abs( real( a( j, j ) ) )
217 absa = abs( a( i, j ) )
219 work( i ) = work( i ) + absa
221 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
224 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
236 IF(
lsame( uplo,
'U' ) )
THEN
240 CALL classq( j-1, a( 1, j ), 1,
241 $ colssq( 1 ), colssq( 2 ) )
248 CALL classq( n-j, a( j+1, j ), 1,
249 $ colssq( 1 ), colssq( 2 ) )
253 ssq( 2 ) = 2*ssq( 2 )
258 IF( real( a( i, i ) ).NE.zero )
THEN
259 absa = abs( real( a( i, i ) ) )
260 IF( ssq( 1 ).LT.absa )
THEN
261 ssq( 2 ) = one + ssq( 2 )*( ssq( 1 ) / absa )**2
264 ssq( 2 ) = ssq( 2 ) + ( absa / ssq( 1 ) )**2
268 VALUE = ssq( 1 )*sqrt( ssq( 2 ) )
subroutine scombssq(V1, V2)
SCOMBSSQ adds two scaled sum of squares quantities
subroutine classq(n, x, incx, scl, sumsq)
CLASSQ updates a sum of squares represented in scaled form.
logical function sisnan(SIN)
SISNAN tests input for NaN.
logical function lsame(CA, CB)
LSAME
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,...