137 SUBROUTINE slacn2( N, V, X, ISGN, EST, KASE, ISAVE )
149 INTEGER ISGN( * ), ISAVE( 3 )
157 parameter ( itmax = 5 )
159 parameter ( zero = 0.0e+0, one = 1.0e+0, two = 2.0e+0 )
163 REAL ALTSGN, ESTOLD, TEMP
168 EXTERNAL isamax, sasum
174 INTRINSIC abs, nint,
REAL, SIGN
180 x( i ) = one /
REAL( n )
187 GO TO ( 20, 40, 70, 110, 140 )isave( 1 )
199 est = sasum( n, x, 1 )
202 x( i ) = sign( one, x( i ) )
203 isgn( i ) = nint( x( i ) )
213 isave( 2 ) = isamax( n, x, 1 )
222 x( isave( 2 ) ) = one
231 CALL scopy( n, x, 1, v, 1 )
233 est = sasum( n, v, 1 )
235 IF( nint( sign( one, x( i ) ) ).NE.isgn( i ) )
247 x( i ) = sign( one, x( i ) )
248 isgn( i ) = nint( x( i ) )
259 isave( 2 ) = isamax( n, x, 1 )
260 IF( ( x( jlast ).NE.abs( x( isave( 2 ) ) ) ) .AND.
261 $ ( isave( 3 ).LT.itmax ) )
THEN
262 isave( 3 ) = isave( 3 ) + 1
271 x( i ) = altsgn*( one+
REAL( I-1 ) /
REAL( N-1 ) )
282 temp = two*( sasum( n, x, 1 ) /
REAL( 3*N ) )
283 IF( temp.GT.est )
THEN
284 CALL scopy( n, x, 1, v, 1 )
subroutine slacn2(N, V, X, ISGN, EST, KASE, ISAVE)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY