127 REAL function
slansb( norm, uplo, n, k, ab, ldab,
139 REAL ab( ldab, * ), work( * )
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. (
lsame( norm,
'O' ) ) .OR.
187 $ ( norm.EQ.
'1' ) )
THEN
192 IF(
lsame( uplo,
'U' ) )
THEN
196 DO 50 i = max( 1, j-k ), j - 1
197 absa = abs( ab( l+i, j ) )
199 work( i ) = work( i ) + absa
201 work( j ) = sum + abs( ab( k+1, j ) )
205 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
212 sum = work( j ) + abs( ab( 1, j ) )
214 DO 90 i = j + 1, min( n, j+k )
215 absa = abs( ab( l+i, j ) )
217 work( i ) = work( i ) + absa
219 IF(
VALUE .LT. sum .OR.
sisnan( sum ) )
VALUE = sum
222 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
229 IF(
lsame( uplo,
'U' ) )
THEN
231 CALL slassq( min( j-1, k ), ab( max( k+2-j, 1 ), j ),
237 CALL slassq( min( n-j, k ), ab( 2, j ), 1, scale,
246 CALL slassq( n, ab( l, 1 ), ldab, scale, sum )
247 VALUE = scale*sqrt( sum )
logical function sisnan(sin)
SISNAN tests input for NaN.
real function slansb(norm, uplo, n, k, ab, ldab, work)
SLANSB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine slassq(n, x, incx, scale, sumsq)
SLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME