1 SUBROUTINE zlacon( N, V, X, EST, KASE )
13 COMPLEX*16 V( N ), X( N )
64 parameter( itmax = 5 )
65 DOUBLE PRECISION ONE, TWO
66 parameter( one = 1.0d0, two = 2.0d0 )
67 COMPLEX*16 CZERO, CONE
68 parameter( czero = ( 0.0d0, 0.0d0 ),
69 $ cone = ( 1.0d0, 0.0d0 ) )
72 INTEGER I, ITER, J, JLAST, JUMP
73 DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
77 DOUBLE PRECISION DLAMCH, DZSUM1
78 EXTERNAL izmax1, dlamch, dzsum1
84 INTRINSIC abs, dble, dcmplx, dimag
91 safmin = dlamch(
'Safe minimum' )
94 x( i ) = dcmplx( one / dble( n ) )
101 GO TO ( 20, 40, 70, 90, 120 )jump
113 est = dzsum1( n, x, 1 )
116 absxi = abs( x( i ) )
117 IF( absxi.GT.safmin )
THEN
118 x( i ) = dcmplx( dble( x( i ) ) / absxi,
119 $ dimag( x( i ) ) / absxi )
132 j = izmax1( n, x, 1 )
150 CALL zcopy( n, x, 1, v, 1 )
152 est = dzsum1( n, v, 1 )
159 absxi = abs( x( i ) )
160 IF( absxi.GT.safmin )
THEN
161 x( i ) = dcmplx( dble( x( i ) ) / absxi,
162 $ dimag( x( i ) ) / absxi )
176 j = izmax1( n, x, 1 )
177 IF( ( abs( x( jlast ) ).NE.abs( x( j ) ) ) .AND.
178 $ ( iter.LT.itmax ) )
THEN
188 x( i ) = dcmplx( altsgn*( one+dble( i-1 ) / dble( n-1 ) ) )
199 temp = two*( dzsum1( n, x, 1 ) / dble( 3*n ) )
200 IF( temp.GT.est )
THEN
201 CALL zcopy( n, x, 1, v, 1 )
subroutine zcopy(n, zx, incx, zy, incy)
subroutine zlacon(N, V, X, EST, KASE)