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
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 )