132 REAL FUNCTION clanhb( NORM, UPLO, N, K, AB, LDAB,
146 COMPLEX ab( ldab, * )
153 parameter( one = 1.0e+0, zero = 0.0e+0 )
157 REAL absa, scale, sum, value
167 INTRINSIC abs, max, min,
REAL, sqrt
173 ELSE IF(
lsame( norm,
'M' ) )
THEN
178 IF(
lsame( uplo,
'U' ) )
THEN
180 DO 10 i = max( k+2-j, 1 ), k
181 sum = abs( ab( i, j ) )
182 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
184 sum = abs(
REAL( AB( K+1, J ) ) )
185 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
189 sum = abs(
REAL( AB( 1, J ) ) )
190 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
191 DO 30 i = 2, min( n+1-j, k+1 )
192 sum = abs( ab( i, j ) )
193 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
197 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
198 $ ( norm.EQ.
'1' ) )
THEN
203 IF(
lsame( uplo,
'U' ) )
THEN
207 DO 50 i = max( 1, j-k ), j - 1
208 absa = abs( ab( l+i, j ) )
210 work( i ) = work( i ) + absa
212 work( j ) = sum + abs(
REAL( AB( K+1, J ) ) )
216 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
223 sum = work( j ) + abs(
REAL( AB( 1, J ) ) )
225 DO 90 i = j + 1, min( n, j+k )
226 absa = abs( ab( l+i, j ) )
228 work( i ) = work( i ) + absa
230 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
233 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
240 IF(
lsame( uplo,
'U' ) )
THEN
242 CALL
classq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
248 CALL
classq( min( n-j, k ), ab( 2, j ), 1, scale,
258 IF(
REAL( AB( L, J ) ).NE.zero ) then
259 absa = abs(
REAL( AB( L, J ) ) )
260 IF( scale.LT.absa )
THEN
261 sum = one + sum*( scale / absa )**2
264 sum = sum + ( absa / scale )**2
268 value = scale*sqrt( sum )