130 REAL FUNCTION clansb( NORM, UPLO, N, K, AB, LDAB,
144 COMPLEX AB( ldab, * )
151 parameter ( one = 1.0e+0, zero = 0.0e+0 )
155 REAL ABSA, SCALE, SUM, VALUE
158 LOGICAL LSAME, SISNAN
159 EXTERNAL lsame, sisnan
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. sisnan( 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. sisnan( 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. sisnan( 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. sisnan( sum ) )
VALUE = sum
227 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
234 IF( lsame( uplo,
'U' ) )
THEN
236 CALL classq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
242 CALL classq( min( n-j, k ), ab( 2, j ), 1, scale,
251 CALL classq( n, ab( l, 1 ), ldab, scale, sum )
252 VALUE = scale*sqrt( sum )
subroutine classq(N, X, INCX, SCALE, SUMSQ)
CLASSQ updates a sum of squares represented in scaled form.
real function clansb(NORM, UPLO, N, K, AB, LDAB, WORK)
CLANSB 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.