1 SUBROUTINE dlacon( N, V, X, ISGN, EST, KASE )
14 DOUBLE PRECISION V( * ), X( * )
65 parameter( itmax = 5 )
66 DOUBLE PRECISION ZERO, ONE, TWO
67 parameter( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
70 INTEGER I, ITER, J, JLAST, JUMP
71 DOUBLE PRECISION ALTSGN, ESTOLD, TEMP
75 DOUBLE PRECISION DASUM
76 EXTERNAL idamax, dasum
82 INTRINSIC abs, dble, nint, sign
91 x( i ) = one / dble( n )
98 GO TO ( 20, 40, 70, 110, 140 )jump
110 est = dasum( n, x, 1 )
113 x( i ) = sign( one, x( i ) )
114 isgn( i ) = nint( x( i ) )
124 j = idamax( n, x, 1 )
142 CALL dcopy( n, x, 1, v, 1 )
144 est = dasum( n, v, 1 )
146 IF( nint( sign( one, x( i ) ) ).NE.isgn( i ) )
158 x( i ) = sign( one, x( i ) )
159 isgn( i ) = nint( x( i ) )
170 j = idamax( n, x, 1 )
171 IF( ( x( jlast ).NE.abs( x( j ) ) ) .AND. ( iter.LT.itmax ) )
THEN
181 x( i ) = altsgn*( one+dble( i-1 ) / dble( n-1 ) )
192 temp = two*( dasum( n, x, 1 ) / dble( 3*n ) )
193 IF( temp.GT.est )
THEN
194 CALL dcopy( n, x, 1, v, 1 )
subroutine dcopy(n, dx, incx, dy, incy)
subroutine dlacon(N, V, X, ISGN, EST, KASE)