128 DOUBLE PRECISION FUNCTION zlansb( NORM, UPLO, N, K, AB, LDAB,
140 DOUBLE PRECISION work( * )
141 COMPLEX*16 ab( ldab, * )
147 DOUBLE PRECISION one, zero
148 parameter( one = 1.0d+0, zero = 0.0d+0 )
152 DOUBLE PRECISION absa, scale, sum, value
162 INTRINSIC abs, max, min, sqrt
168 ELSE IF(
lsame( norm,
'M' ) )
THEN
173 IF(
lsame( uplo,
'U' ) )
THEN
175 DO 10 i = max( k+2-j, 1 ), k + 1
176 sum = abs( ab( i, j ) )
177 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
182 DO 30 i = 1, min( n+1-j, k+1 )
183 sum = abs( ab( i, j ) )
184 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
188 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
189 $ ( norm.EQ.
'1' ) )
THEN
194 IF(
lsame( uplo,
'U' ) )
THEN
198 DO 50 i = max( 1, j-k ), j - 1
199 absa = abs( ab( l+i, j ) )
201 work( i ) = work( i ) + absa
203 work( j ) = sum + abs( ab( k+1, j ) )
207 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
214 sum = work( j ) + abs( ab( 1, j ) )
216 DO 90 i = j + 1, min( n, j+k )
217 absa = abs( ab( l+i, j ) )
219 work( i ) = work( i ) + absa
221 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
224 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
231 IF(
lsame( uplo,
'U' ) )
THEN
233 CALL zlassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
239 CALL zlassq( min( n-j, k ), ab( 2, j ), 1, scale,
248 CALL zlassq( n, ab( l, 1 ), ldab, scale, sum )
249 VALUE = scale*sqrt( sum )
logical function disnan(din)
DISNAN tests input for NaN.
double precision function zlansb(norm, uplo, n, k, ab, ldab, work)
ZLANSB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine zlassq(n, x, incx, scale, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME