130 DOUBLE PRECISION FUNCTION zlanhb( NORM, UPLO, N, K, AB, LDAB,
142 DOUBLE PRECISION work( * )
143 COMPLEX*16 ab( ldab, * )
149 DOUBLE PRECISION one, zero
150 parameter( one = 1.0d+0, zero = 0.0d+0 )
154 DOUBLE PRECISION absa, scale, sum, value
164 INTRINSIC abs, dble, max, min, sqrt
170 ELSE IF(
lsame( norm,
'M' ) )
THEN
175 IF(
lsame( uplo,
'U' ) )
THEN
177 DO 10 i = max( k+2-j, 1 ), k
178 sum = abs( ab( i, j ) )
179 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
181 sum = abs( dble( ab( k+1, j ) ) )
182 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
186 sum = abs( dble( ab( 1, j ) ) )
187 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
188 DO 30 i = 2, min( n+1-j, k+1 )
189 sum = abs( ab( i, j ) )
190 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
194 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
195 $ ( norm.EQ.
'1' ) )
THEN
200 IF(
lsame( uplo,
'U' ) )
THEN
204 DO 50 i = max( 1, j-k ), j - 1
205 absa = abs( ab( l+i, j ) )
207 work( i ) = work( i ) + absa
209 work( j ) = sum + abs( dble( ab( k+1, j ) ) )
213 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
220 sum = work( j ) + abs( dble( ab( 1, j ) ) )
222 DO 90 i = j + 1, min( n, j+k )
223 absa = abs( ab( l+i, j ) )
225 work( i ) = work( i ) + absa
227 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
230 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
237 IF(
lsame( uplo,
'U' ) )
THEN
239 CALL zlassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
245 CALL zlassq( min( n-j, k ), ab( 2, j ), 1, scale,
255 IF( dble( ab( l, j ) ).NE.zero )
THEN
256 absa = abs( dble( ab( l, j ) ) )
257 IF( scale.LT.absa )
THEN
258 sum = one + sum*( scale / absa )**2
261 sum = sum + ( absa / scale )**2
265 VALUE = scale*sqrt( sum )
logical function disnan(din)
DISNAN tests input for NaN.
double precision function zlanhb(norm, uplo, n, k, ab, ldab, work)
ZLANHB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine zlassq(n, x, incx, scale, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME