129 REAL FUNCTION slansb( NORM, UPLO, N, K, AB, LDAB,
142 REAL AB( ldab, * ), WORK( * )
149 parameter ( one = 1.0e+0, zero = 0.0e+0 )
153 REAL ABSA, SCALE, SUM, VALUE
159 LOGICAL LSAME, SISNAN
160 EXTERNAL lsame, sisnan
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. sisnan( 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. sisnan( 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. sisnan( 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. sisnan( sum ) )
VALUE = sum
225 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
232 IF( lsame( uplo,
'U' ) )
THEN
234 CALL slassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
240 CALL slassq( min( n-j, k ), ab( 2, j ), 1, scale,
249 CALL slassq( n, ab( l, 1 ), ldab, scale, sum )
250 VALUE = scale*sqrt( sum )
real function slansb(NORM, UPLO, N, K, AB, LDAB, WORK)
SLANSB 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 slassq(N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.