138 DOUBLE PRECISION FUNCTION dlantb( NORM, UPLO, DIAG, N, K, AB,
146 CHARACTER diag, norm, uplo
150 DOUBLE PRECISION ab( ldab, * ), work( * )
156 DOUBLE PRECISION one, zero
157 parameter( one = 1.0d+0, zero = 0.0d+0 )
162 DOUBLE PRECISION scale, sum, value
172 INTRINSIC abs, max, min, sqrt
178 ELSE IF(
lsame( norm,
'M' ) )
THEN
182 IF(
lsame( diag,
'U' ) )
THEN
184 IF(
lsame( uplo,
'U' ) )
THEN
186 DO 10 i = max( k+2-j, 1 ), k
187 sum = abs( ab( i, j ) )
188 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
193 DO 30 i = 2, min( n+1-j, k+1 )
194 sum = abs( ab( i, j ) )
195 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
201 IF(
lsame( uplo,
'U' ) )
THEN
203 DO 50 i = max( k+2-j, 1 ), k + 1
204 sum = abs( ab( i, j ) )
205 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
210 DO 70 i = 1, min( n+1-j, k+1 )
211 sum = abs( ab( i, j ) )
212 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
217 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
222 udiag =
lsame( diag,
'U' )
223 IF(
lsame( uplo,
'U' ) )
THEN
227 DO 90 i = max( k+2-j, 1 ), k
228 sum = sum + abs( ab( i, j ) )
232 DO 100 i = max( k+2-j, 1 ), k + 1
233 sum = sum + abs( ab( i, j ) )
236 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
242 DO 120 i = 2, min( n+1-j, k+1 )
243 sum = sum + abs( ab( i, j ) )
247 DO 130 i = 1, min( n+1-j, k+1 )
248 sum = sum + abs( ab( i, j ) )
251 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
254 ELSE IF(
lsame( norm,
'I' ) )
THEN
259 IF(
lsame( uplo,
'U' ) )
THEN
260 IF(
lsame( diag,
'U' ) )
THEN
266 DO 160 i = max( 1, j-k ), j - 1
267 work( i ) = work( i ) + abs( ab( l+i, j ) )
276 DO 190 i = max( 1, j-k ), j
277 work( i ) = work( i ) + abs( ab( l+i, j ) )
282 IF(
lsame( diag,
'U' ) )
THEN
288 DO 220 i = j + 1, min( n, j+k )
289 work( i ) = work( i ) + abs( ab( l+i, j ) )
298 DO 250 i = j, min( n, j+k )
299 work( i ) = work( i ) + abs( ab( l+i, j ) )
306 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
308 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
312 IF(
lsame( uplo,
'U' ) )
THEN
313 IF(
lsame( diag,
'U' ) )
THEN
318 CALL dlassq( min( j-1, k ),
319 $ ab( max( k+2-j, 1 ), j ), 1, scale,
327 CALL dlassq( min( j, k+1 ), ab( max( k+2-j, 1 ), j ),
332 IF(
lsame( diag,
'U' ) )
THEN
337 CALL dlassq( min( n-j, k ), ab( 2, j ), 1, scale,
345 CALL dlassq( min( n-j+1, k+1 ), ab( 1, j ), 1, scale,
350 VALUE = scale*sqrt( sum )
logical function disnan(din)
DISNAN tests input for NaN.
double precision function dlantb(norm, uplo, diag, n, k, ab, ldab, work)
DLANTB 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