115 REAL FUNCTION slansp( NORM, UPLO, N, AP, WORK )
127 REAL ap( * ), work( * )
134 parameter( one = 1.0e+0, zero = 0.0e+0 )
138 REAL absa, scale, sum,
value
154 ELSE IF(
lsame( norm,
'M' ) )
THEN
159 IF(
lsame( uplo,
'U' ) )
THEN
162 DO 10 i = k, k +
j - 1
171 DO 30 i = k, k + n -
j
178 ELSE IF( (
lsame( norm,
'I' ) ) .OR. (
lsame( norm,
'O' ) ) .OR.
179 $ ( norm.EQ.
'1' ) )
THEN
185 IF(
lsame( uplo,
'U' ) )
THEN
189 absa = abs( ap( k ) )
191 work( i ) = work( i ) + absa
194 work(
j ) = sum + abs( ap( k ) )
206 sum = work(
j ) + abs( ap( k ) )
209 absa = abs( ap( k ) )
211 work( i ) = work( i ) + absa
217 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
224 IF(
lsame( uplo,
'U' ) )
THEN
226 CALL
slassq(
j-1, ap( k ), 1, scale, sum )
231 CALL
slassq( n-
j, ap( k ), 1, scale, sum )
238 IF( ap( k ).NE.zero )
THEN
239 absa = abs( ap( k ) )
240 IF( scale.LT.absa )
THEN
241 sum = one + sum*( scale / absa )**2
244 sum = sum + ( absa / scale )**2
247 IF(
lsame( uplo,
'U' ) )
THEN
253 value = scale*sqrt( sum )
subroutine slassq(N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.
REAL function slansp(NORM, UPLO, N, AP, WORK)
SLANSP 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 matrix supplied in packed form.
LOGICAL function lsame(CA, CB)
LSAME
input scalars passed by value
LOGICAL function sisnan(SIN)
SISNAN tests input for NaN.
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j