123 REAL FUNCTION slansy( NORM, UPLO, N, A, LDA, WORK )
135 REAL A( lda, * ), WORK( * )
142 parameter ( one = 1.0e+0, zero = 0.0e+0 )
146 REAL ABSA, SCALE, SUM, VALUE
152 LOGICAL LSAME, SISNAN
153 EXTERNAL lsame, sisnan
162 ELSE IF( lsame( norm,
'M' ) )
THEN
167 IF( lsame( uplo,
'U' ) )
THEN
170 sum = abs( a( i, j ) )
171 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
177 sum = abs( a( i, j ) )
178 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
182 ELSE IF( ( lsame( norm,
'I' ) ) .OR. ( lsame( norm,
'O' ) ) .OR.
183 $ ( norm.EQ.
'1' ) )
THEN
188 IF( lsame( uplo,
'U' ) )
THEN
192 absa = abs( a( i, j ) )
194 work( i ) = work( i ) + absa
196 work( j ) = sum + abs( a( j, j ) )
200 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
207 sum = work( j ) + abs( a( j, j ) )
209 absa = abs( a( i, j ) )
211 work( i ) = work( i ) + absa
213 IF(
VALUE .LT. sum .OR. sisnan( sum ) )
VALUE = sum
216 ELSE IF( ( lsame( norm,
'F' ) ) .OR. ( lsame( norm,
'E' ) ) )
THEN
222 IF( lsame( uplo,
'U' ) )
THEN
224 CALL slassq( j-1, a( 1, j ), 1, scale, sum )
228 CALL slassq( n-j, a( j+1, j ), 1, scale, sum )
232 CALL slassq( n, a, lda+1, scale, sum )
233 VALUE = scale*sqrt( sum )
subroutine slassq(N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.
real function slansy(NORM, UPLO, N, A, LDA, WORK)
SLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix.