126 REAL function
clansb( norm, uplo, n, k, ab, ldab,
139 COMPLEX ab( ldab, * )
146 parameter( one = 1.0e+0, zero = 0.0e+0 )
150 REAL 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.
sisnan( 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.
sisnan( sum ) )
VALUE = sum
186 ELSE IF( (
lsame( norm,
'I' ) ) .OR.
187 $ (
lsame( norm,
'O' ) ) .OR.
188 $ ( norm.EQ.
'1' ) )
THEN
193 IF(
lsame( uplo,
'U' ) )
THEN
197 DO 50 i = max( 1, j-k ), j - 1
198 absa = abs( ab( l+i, j ) )
200 work( i ) = work( i ) + absa
202 work( j ) = sum + abs( ab( k+1, j ) )
206 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
213 sum = work( j ) + abs( ab( 1, j ) )
215 DO 90 i = j + 1, min( n, j+k )
216 absa = abs( ab( l+i, j ) )
218 work( i ) = work( i ) + absa
220 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
223 ELSE IF( (
lsame( norm,
'F' ) ) .OR.
224 $ (
lsame( norm,
'E' ) ) )
THEN
231 IF(
lsame( uplo,
'U' ) )
THEN
233 CALL classq( min( j-1, k ), ab( max( k+2-j, 1 ),
240 CALL classq( min( n-j, k ), ab( 2, j ), 1, scale,
249 CALL classq( n, ab( l, 1 ), ldab, scale, sum )
250 VALUE = scale*sqrt( sum )
real function clansb(norm, uplo, n, k, ab, ldab, work)
CLANSB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine classq(n, x, incx, scale, sumsq)
CLASSQ updates a sum of squares represented in scaled form.