109 REAL FUNCTION slanhs( NORM, N, A, LDA, WORK )
121 REAL A( lda, * ), WORK( * )
128 parameter ( one = 1.0e+0, zero = 0.0e+0 )
132 REAL SCALE, SUM, VALUE
138 LOGICAL LSAME, SISNAN
139 EXTERNAL lsame, sisnan
142 INTRINSIC abs, min, sqrt
148 ELSE IF( lsame( norm,
'M' ) )
THEN
154 DO 10 i = 1, min( n, j+1 )
155 sum = abs( a( i, j ) )
156 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
159 ELSE IF( ( lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
166 DO 30 i = 1, min( n, j+1 )
167 sum = sum + abs( a( i, j ) )
169 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
171 ELSE IF( lsame( norm,
'I' ) )
THEN
179 DO 60 i = 1, min( n, j+1 )
180 work( i ) = work( i ) + abs( a( i, j ) )
186 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
188 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
195 CALL slassq( min( n, j+1 ), a( 1, j ), 1, scale, sum )
197 VALUE = scale*sqrt( sum )
real function slanhs(NORM, N, A, LDA, WORK)
SLANHS returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine slassq(N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.