141 DOUBLE PRECISION FUNCTION zlantb( NORM, UPLO, DIAG, N, K, AB,
150 CHARACTER diag, norm, uplo
154 DOUBLE PRECISION work( * )
155 COMPLEX*16 ab( ldab, * )
161 DOUBLE PRECISION one, zero
162 parameter( one = 1.0d+0, zero = 0.0d+0 )
167 DOUBLE PRECISION scale, sum, value
177 INTRINSIC abs, max, min, sqrt
183 ELSE IF(
lsame( norm,
'M' ) )
THEN
187 IF(
lsame( diag,
'U' ) )
THEN
189 IF(
lsame( uplo,
'U' ) )
THEN
191 DO 10 i = max( k+2-j, 1 ), k
192 sum = abs( ab( i, j ) )
193 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
198 DO 30 i = 2, min( n+1-j, k+1 )
199 sum = abs( ab( i, j ) )
200 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
206 IF(
lsame( uplo,
'U' ) )
THEN
208 DO 50 i = max( k+2-j, 1 ), k + 1
209 sum = abs( ab( i, j ) )
210 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
215 DO 70 i = 1, min( n+1-j, k+1 )
216 sum = abs( ab( i, j ) )
217 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
222 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
227 udiag =
lsame( diag,
'U' )
228 IF(
lsame( uplo,
'U' ) )
THEN
232 DO 90 i = max( k+2-j, 1 ), k
233 sum = sum + abs( ab( i, j ) )
237 DO 100 i = max( k+2-j, 1 ), k + 1
238 sum = sum + abs( ab( i, j ) )
241 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
247 DO 120 i = 2, min( n+1-j, k+1 )
248 sum = sum + abs( ab( i, j ) )
252 DO 130 i = 1, min( n+1-j, k+1 )
253 sum = sum + abs( ab( i, j ) )
256 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
259 ELSE IF(
lsame( norm,
'I' ) )
THEN
264 IF(
lsame( uplo,
'U' ) )
THEN
265 IF(
lsame( diag,
'U' ) )
THEN
271 DO 160 i = max( 1, j-k ), j - 1
272 work( i ) = work( i ) + abs( ab( l+i, j ) )
281 DO 190 i = max( 1, j-k ), j
282 work( i ) = work( i ) + abs( ab( l+i, j ) )
287 IF(
lsame( diag,
'U' ) )
THEN
293 DO 220 i = j + 1, min( n, j+k )
294 work( i ) = work( i ) + abs( ab( l+i, j ) )
303 DO 250 i = j, min( n, j+k )
304 work( i ) = work( i ) + abs( ab( l+i, j ) )
311 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
313 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
317 IF(
lsame( uplo,
'U' ) )
THEN
318 IF(
lsame( diag,
'U' ) )
THEN
323 CALL
zlassq( min( j-1, k ),
324 $ ab( max( k+2-j, 1 ), j ), 1, scale,
332 CALL
zlassq( min( j, k+1 ), ab( max( k+2-j, 1 ), j ),
337 IF(
lsame( diag,
'U' ) )
THEN
342 CALL
zlassq( min( n-j, k ), ab( 2, j ), 1, scale,
350 CALL
zlassq( min( n-j+1, k+1 ), ab( 1, j ), 1, scale,
355 value = scale*sqrt( sum )