128 REAL function
clanhb( norm, uplo, n, k, ab, ldab,
141 COMPLEX ab( ldab, * )
148 parameter( one = 1.0e+0, zero = 0.0e+0 )
152 REAL absa, scale, sum, value
162 INTRINSIC abs, max, min, real, sqrt
168 ELSE IF(
lsame( norm,
'M' ) )
THEN
173 IF(
lsame( uplo,
'U' ) )
THEN
175 DO 10 i = max( k+2-j, 1 ), k
176 sum = abs( ab( i, j ) )
177 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
179 sum = abs( real( ab( k+1, j ) ) )
180 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
184 sum = abs( real( ab( 1, j ) ) )
185 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
186 DO 30 i = 2, min( n+1-j, k+1 )
187 sum = abs( ab( i, j ) )
188 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
192 ELSE IF( (
lsame( norm,
'I' ) ) .OR.
193 $ (
lsame( norm,
'O' ) ) .OR.
194 $ ( norm.EQ.
'1' ) )
THEN
199 IF(
lsame( uplo,
'U' ) )
THEN
203 DO 50 i = max( 1, j-k ), j - 1
204 absa = abs( ab( l+i, j ) )
206 work( i ) = work( i ) + absa
208 work( j ) = sum + abs( real( ab( k+1, j ) ) )
212 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
219 sum = work( j ) + abs( real( ab( 1, j ) ) )
221 DO 90 i = j + 1, min( n, j+k )
222 absa = abs( ab( l+i, j ) )
224 work( i ) = work( i ) + absa
226 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
229 ELSE IF( (
lsame( norm,
'F' ) ) .OR.
230 $ (
lsame( norm,
'E' ) ) )
THEN
237 IF(
lsame( uplo,
'U' ) )
THEN
239 CALL classq( min( j-1, k ), ab( max( k+2-j, 1 ),
246 CALL classq( min( n-j, k ), ab( 2, j ), 1, scale,
256 IF( real( ab( l, j ) ).NE.zero )
THEN
257 absa = abs( real( ab( l, j ) ) )
258 IF( scale.LT.absa )
THEN
259 sum = one + sum*( scale / absa )**2
262 sum = sum + ( absa / scale )**2
266 VALUE = scale*sqrt( sum )
real function clanhb(norm, uplo, n, k, ab, ldab, work)
CLANHB 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.