130 DOUBLE PRECISION FUNCTION zlansb( NORM, UPLO, N, K, AB, LDAB,
143 DOUBLE PRECISION WORK( * )
144 COMPLEX*16 AB( ldab, * )
150 DOUBLE PRECISION ONE, ZERO
151 parameter ( one = 1.0d+0, zero = 0.0d+0 )
155 DOUBLE PRECISION ABSA, SCALE, SUM, VALUE
158 LOGICAL LSAME, DISNAN
159 EXTERNAL lsame, disnan
165 INTRINSIC abs, max, min, sqrt
171 ELSE IF( lsame( norm,
'M' ) )
THEN
176 IF( lsame( uplo,
'U' ) )
THEN
178 DO 10 i = max( k+2-j, 1 ), k + 1
179 sum = abs( ab( i, j ) )
180 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
185 DO 30 i = 1, min( n+1-j, k+1 )
186 sum = abs( ab( i, j ) )
187 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
191 ELSE IF( ( lsame( norm,
'I' ) ) .OR. ( lsame( norm,
'O' ) ) .OR.
192 $ ( norm.EQ.
'1' ) )
THEN
197 IF( lsame( uplo,
'U' ) )
THEN
201 DO 50 i = max( 1, j-k ), j - 1
202 absa = abs( ab( l+i, j ) )
204 work( i ) = work( i ) + absa
206 work( j ) = sum + abs( ab( k+1, j ) )
210 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
217 sum = work( j ) + abs( ab( 1, j ) )
219 DO 90 i = j + 1, min( n, j+k )
220 absa = abs( ab( l+i, j ) )
222 work( i ) = work( i ) + absa
224 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
227 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
234 IF( lsame( uplo,
'U' ) )
THEN
236 CALL zlassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
242 CALL zlassq( min( n-j, k ), ab( 2, j ), 1, scale,
251 CALL zlassq( n, ab( l, 1 ), ldab, scale, sum )
252 VALUE = scale*sqrt( sum )
subroutine zlassq(N, X, INCX, SCALE, SUMSQ)
ZLASSQ updates a sum of squares represented in scaled form.
double precision function zlansb(NORM, UPLO, N, K, AB, LDAB, WORK)
ZLANSB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a symmetric band matrix.