140 REAL FUNCTION slantb( NORM, UPLO, DIAG, N, K, AB,
149 CHARACTER diag, norm, uplo
153 REAL ab( ldab, * ), work( * )
160 parameter( one = 1.0e+0, zero = 0.0e+0 )
165 REAL scale, sum, value
175 INTRINSIC abs, max, min, sqrt
181 ELSE IF(
lsame( norm,
'M' ) )
THEN
185 IF(
lsame( diag,
'U' ) )
THEN
187 IF(
lsame( uplo,
'U' ) )
THEN
189 DO 10 i = max( k+2-j, 1 ), k
190 sum = abs( ab( i, j ) )
191 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
196 DO 30 i = 2, min( n+1-j, k+1 )
197 sum = abs( ab( i, j ) )
198 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
204 IF(
lsame( uplo,
'U' ) )
THEN
206 DO 50 i = max( k+2-j, 1 ), k + 1
207 sum = abs( ab( i, j ) )
208 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
213 DO 70 i = 1, min( n+1-j, k+1 )
214 sum = abs( ab( i, j ) )
215 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
220 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
225 udiag =
lsame( diag,
'U' )
226 IF(
lsame( uplo,
'U' ) )
THEN
230 DO 90 i = max( k+2-j, 1 ), k
231 sum = sum + abs( ab( i, j ) )
235 DO 100 i = max( k+2-j, 1 ), k + 1
236 sum = sum + abs( ab( i, j ) )
239 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
245 DO 120 i = 2, min( n+1-j, k+1 )
246 sum = sum + abs( ab( i, j ) )
250 DO 130 i = 1, min( n+1-j, k+1 )
251 sum = sum + abs( ab( i, j ) )
254 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
257 ELSE IF(
lsame( norm,
'I' ) )
THEN
262 IF(
lsame( uplo,
'U' ) )
THEN
263 IF(
lsame( diag,
'U' ) )
THEN
269 DO 160 i = max( 1, j-k ), j - 1
270 work( i ) = work( i ) + abs( ab( l+i, j ) )
279 DO 190 i = max( 1, j-k ), j
280 work( i ) = work( i ) + abs( ab( l+i, j ) )
285 IF(
lsame( diag,
'U' ) )
THEN
291 DO 220 i = j + 1, min( n, j+k )
292 work( i ) = work( i ) + abs( ab( l+i, j ) )
301 DO 250 i = j, min( n, j+k )
302 work( i ) = work( i ) + abs( ab( l+i, j ) )
309 IF( value .LT. sum .OR.
sisnan( sum ) ) value = sum
311 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
315 IF(
lsame( uplo,
'U' ) )
THEN
316 IF(
lsame( diag,
'U' ) )
THEN
321 CALL
slassq( min( j-1, k ),
322 $ ab( max( k+2-j, 1 ), j ), 1, scale,
330 CALL
slassq( min( j, k+1 ), ab( max( k+2-j, 1 ), j ),
335 IF(
lsame( diag,
'U' ) )
THEN
340 CALL
slassq( min( n-j, k ), ab( 2, j ), 1, scale,
348 CALL
slassq( min( n-j+1, k+1 ), ab( 1, j ), 1, scale,
353 value = scale*sqrt( sum )