130 REAL FUNCTION clansb( NORM, UPLO, N, K, AB, LDAB,
144 COMPLEX ab( ldab, * )
151 parameter( one = 1.0e+0, zero = 0.0e+0 )
155 REAL absa, scale, sum,
value
165 INTRINSIC abs, max, min, sqrt
171 ELSE IF(
lsame( norm,
'M' ) )
THEN
176 IF(
lsame( uplo,
'U' ) )
THEN
178 DO 10 i = max( k+2-
j, 1 ), k + 1
179 sum = abs( ab( i,
j ) )
185 DO 30 i = 1, min( n+1-
j, k+1 )
186 sum = abs( ab( i,
j ) )
191 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
192 $ ( norm.EQ.
'1' ) )
THEN
197 IF(
lsame( uplo,
'U' ) )
THEN
201 DO 50 i = max( 1,
j-k ),
j - 1
202 absa = abs( ab( l+i,
j ) )
204 work( i ) = work( i ) + absa
206 work(
j ) = sum + abs( ab( k+1,
j ) )
217 sum = work(
j ) + abs( ab( 1,
j ) )
219 DO 90 i =
j + 1, min( n,
j+k )
220 absa = abs( ab( l+i,
j ) )
222 work( i ) = work( i ) + absa
227 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
234 IF(
lsame( uplo,
'U' ) )
THEN
236 CALL
classq( min(
j-1, k ), ab( max( k+2-
j, 1 ),
j ),
242 CALL
classq( min( n-
j, k ), ab( 2,
j ), 1, scale,
251 CALL
classq( n, ab( l, 1 ), ldab, scale, sum )
252 value = scale*sqrt( sum )
input scalars passed by value
logical function lsame(CA, CB)
LSAME
subroutine classq(N, X, INCX, SCALE, SUMSQ)
CLASSQ updates a sum of squares represented in scaled form.
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
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, or the element of largest absolute value of a symmetric band matrix.
logical function sisnan(SIN)
SISNAN tests input for NaN.