133 SUBROUTINE dlacn2( N, V, X, ISGN, EST, KASE, ISAVE )
144 INTEGER ISGN( * ), ISAVE( 3 )
145 DOUBLE PRECISION V( * ), X( * )
152 parameter( itmax = 5 )
153 DOUBLE PRECISION ZERO, ONE, TWO
154 parameter( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
158 DOUBLE PRECISION ALTSGN, ESTOLD, TEMP, XS
162 DOUBLE PRECISION DASUM
163 EXTERNAL idamax, dasum
169 INTRINSIC abs, dble, nint
175 x( i ) = one / dble( n )
182 GO TO ( 20, 40, 70, 110, 140 )isave( 1 )
194 est = dasum( n, x, 1 )
197 IF( x(i).GE.zero )
THEN
202 isgn( i ) = nint( x( i ) )
212 isave( 2 ) = idamax( n, x, 1 )
221 x( isave( 2 ) ) = one
230 CALL dcopy( n, x, 1, v, 1 )
232 est = dasum( n, v, 1 )
234 IF( x(i).GE.zero )
THEN
239 IF( nint( xs ).NE.isgn( i ) )
251 IF( x(i).GE.zero )
THEN
256 isgn( i ) = nint( x( i ) )
267 isave( 2 ) = idamax( n, x, 1 )
268 IF( ( x( jlast ).NE.abs( x( isave( 2 ) ) ) ) .AND.
269 $ ( isave( 3 ).LT.itmax ) )
THEN
270 isave( 3 ) = isave( 3 ) + 1
279 x( i ) = altsgn*( one+dble( i-1 ) / dble( n-1 ) )
290 temp = two*( dasum( n, x, 1 ) / dble( 3*n ) )
291 IF( temp.GT.est )
THEN
292 CALL dcopy( n, x, 1, v, 1 )
subroutine dlacn2(n, v, x, isgn, est, kase, isave)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...