129 DOUBLE PRECISION FUNCTION dlansb( NORM, UPLO, N, K, AB, LDAB,
142 DOUBLE PRECISION AB( ldab, * ), WORK( * )
148 DOUBLE PRECISION ONE, ZERO
149 parameter ( one = 1.0d+0, zero = 0.0d+0 )
153 DOUBLE PRECISION ABSA, SCALE, SUM, VALUE
159 LOGICAL LSAME, DISNAN
160 EXTERNAL lsame, disnan
163 INTRINSIC abs, max, min, sqrt
169 ELSE IF( lsame( norm,
'M' ) )
THEN
174 IF( lsame( uplo,
'U' ) )
THEN
176 DO 10 i = max( k+2-j, 1 ), k + 1
177 sum = abs( ab( i, j ) )
178 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
183 DO 30 i = 1, min( n+1-j, k+1 )
184 sum = abs( ab( i, j ) )
185 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
189 ELSE IF( ( lsame( norm,
'I' ) ) .OR. ( lsame( norm,
'O' ) ) .OR.
190 $ ( norm.EQ.
'1' ) )
THEN
195 IF( lsame( uplo,
'U' ) )
THEN
199 DO 50 i = max( 1, j-k ), j - 1
200 absa = abs( ab( l+i, j ) )
202 work( i ) = work( i ) + absa
204 work( j ) = sum + abs( ab( k+1, j ) )
208 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
215 sum = work( j ) + abs( ab( 1, j ) )
217 DO 90 i = j + 1, min( n, j+k )
218 absa = abs( ab( l+i, j ) )
220 work( i ) = work( i ) + absa
222 IF(
VALUE .LT. sum .OR. disnan( sum ) )
VALUE = sum
225 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
232 IF( lsame( uplo,
'U' ) )
THEN
234 CALL dlassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
240 CALL dlassq( min( n-j, k ), ab( 2, j ), 1, scale,
249 CALL dlassq( n, ab( l, 1 ), ldab, scale, sum )
250 VALUE = scale*sqrt( sum )
double precision function dlansb(NORM, UPLO, N, K, AB, LDAB, WORK)
DLANSB 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.
subroutine dlassq(N, X, INCX, SCALE, SUMSQ)
DLASSQ updates a sum of squares represented in scaled form.