132 DOUBLE PRECISION FUNCTION zlanhb( NORM, UPLO, N, K, AB, LDAB,
145 DOUBLE PRECISION work( * )
146 COMPLEX*16 ab( ldab, * )
152 DOUBLE PRECISION one, zero
153 parameter( one = 1.0d+0, zero = 0.0d+0 )
157 DOUBLE PRECISION absa, scale, sum, value
167 INTRINSIC abs, dble, max, min, 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.
disnan( sum ) ) value = sum
184 sum = abs( dble( ab( k+1, j ) ) )
185 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
189 sum = abs( dble( ab( 1, j ) ) )
190 IF( value .LT. sum .OR.
disnan( 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.
disnan( 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( dble( ab( k+1, j ) ) )
216 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
223 sum = work( j ) + abs( dble( 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.
disnan( sum ) ) value = sum
233 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
240 IF(
lsame( uplo,
'U' ) )
THEN
242 CALL
zlassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
248 CALL
zlassq( min( n-j, k ), ab( 2, j ), 1, scale,
258 IF( dble( ab( l, j ) ).NE.zero )
THEN
259 absa = abs( dble( 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 )