115 SUBROUTINE zlacon( N, V, X, EST, KASE )
127 COMPLEX*16 V( n ), X( n )
134 parameter ( itmax = 5 )
135 DOUBLE PRECISION ONE, TWO
136 parameter ( one = 1.0d0, two = 2.0d0 )
137 COMPLEX*16 CZERO, CONE
138 parameter ( czero = ( 0.0d0, 0.0d0 ),
139 $ cone = ( 1.0d0, 0.0d0 ) )
142 INTEGER I, ITER, J, JLAST, JUMP
143 DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
147 DOUBLE PRECISION DLAMCH, DZSUM1
148 EXTERNAL izmax1, dlamch, dzsum1
154 INTRINSIC abs, dble, dcmplx, dimag
161 safmin = dlamch(
'Safe minimum' )
164 x( i ) = dcmplx( one / dble( n ) )
171 GO TO ( 20, 40, 70, 90, 120 )jump
183 est = dzsum1( n, x, 1 )
186 absxi = abs( x( i ) )
187 IF( absxi.GT.safmin )
THEN
188 x( i ) = dcmplx( dble( x( i ) ) / absxi,
189 $ dimag( x( i ) ) / absxi )
202 j = izmax1( n, x, 1 )
220 CALL zcopy( n, x, 1, v, 1 )
222 est = dzsum1( n, v, 1 )
229 absxi = abs( x( i ) )
230 IF( absxi.GT.safmin )
THEN
231 x( i ) = dcmplx( dble( x( i ) ) / absxi,
232 $ dimag( x( i ) ) / absxi )
246 j = izmax1( n, x, 1 )
247 IF( ( abs( x( jlast ) ).NE.abs( x( j ) ) ) .AND.
248 $ ( iter.LT.itmax ) )
THEN
258 x( i ) = dcmplx( altsgn*( one+dble( i-1 ) / dble( n-1 ) ) )
269 temp = two*( dzsum1( n, x, 1 ) / dble( 3*n ) )
270 IF( temp.GT.est )
THEN
271 CALL zcopy( n, x, 1, v, 1 )
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
subroutine zlacon(N, V, X, EST, KASE)
ZLACON estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...