127 DOUBLE PRECISION FUNCTION dlansb( NORM, UPLO, N, K, AB, LDAB,
139 DOUBLE PRECISION ab( ldab, * ), work( * )
145 DOUBLE PRECISION one, zero
146 parameter( one = 1.0d+0, zero = 0.0d+0 )
150 DOUBLE PRECISION absa, scale, sum, value
160 INTRINSIC abs, max, min, sqrt
166 ELSE IF(
lsame( norm,
'M' ) )
THEN
171 IF(
lsame( uplo,
'U' ) )
THEN
173 DO 10 i = max( k+2-j, 1 ), k + 1
174 sum = abs( ab( i, j ) )
175 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
180 DO 30 i = 1, min( n+1-j, k+1 )
181 sum = abs( ab( i, j ) )
182 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
186 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
187 $ ( norm.EQ.
'1' ) )
THEN
192 IF(
lsame( uplo,
'U' ) )
THEN
196 DO 50 i = max( 1, j-k ), j - 1
197 absa = abs( ab( l+i, j ) )
199 work( i ) = work( i ) + absa
201 work( j ) = sum + abs( ab( k+1, j ) )
205 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
212 sum = work( j ) + abs( ab( 1, j ) )
214 DO 90 i = j + 1, min( n, j+k )
215 absa = abs( ab( l+i, j ) )
217 work( i ) = work( i ) + absa
219 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
222 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
229 IF(
lsame( uplo,
'U' ) )
THEN
231 CALL dlassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
237 CALL dlassq( min( n-j, k ), ab( 2, j ), 1, scale,
246 CALL dlassq( n, ab( l, 1 ), ldab, scale, sum )
247 VALUE = scale*sqrt( sum )
logical function disnan(din)
DISNAN tests input for NaN.
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,...
subroutine dlassq(n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME