132 SUBROUTINE zlacn2( N, V, X, EST, KASE, ISAVE )
144 COMPLEX*16 V( * ), X( * )
151 parameter( itmax = 5 )
152 DOUBLE PRECISION ONE, TWO
153 parameter( one = 1.0d0, two = 2.0d0 )
154 COMPLEX*16 CZERO, CONE
155 parameter( czero = ( 0.0d0, 0.0d0 ),
156 $ cone = ( 1.0d0, 0.0d0 ) )
160 DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
164 DOUBLE PRECISION DLAMCH, DZSUM1
165 EXTERNAL izmax1, dlamch, dzsum1
171 INTRINSIC abs, dble, dcmplx, dimag
175 safmin = dlamch(
'Safe minimum' )
178 x( i ) = dcmplx( one / dble( n ) )
185 GO TO ( 20, 40, 70, 90, 120 )isave( 1 )
197 est = dzsum1( n, x, 1 )
200 absxi = abs( x( i ) )
201 IF( absxi.GT.safmin )
THEN
202 x( i ) = dcmplx( dble( x( i ) ) / absxi,
203 $ dimag( x( i ) ) / absxi )
216 isave( 2 ) = izmax1( n, x, 1 )
225 x( isave( 2 ) ) = cone
234 CALL zcopy( n, x, 1, v, 1 )
236 est = dzsum1( n, v, 1 )
243 absxi = abs( x( i ) )
244 IF( absxi.GT.safmin )
THEN
245 x( i ) = dcmplx( dble( x( i ) ) / absxi,
246 $ dimag( x( i ) ) / absxi )
260 isave( 2 ) = izmax1( n, x, 1 )
261 IF( ( abs( x( jlast ) ).NE.abs( x( isave( 2 ) ) ) ) .AND.
262 $ ( isave( 3 ).LT.itmax ) )
THEN
263 isave( 3 ) = isave( 3 ) + 1
272 x( i ) = dcmplx( altsgn*( one+dble( i-1 ) / dble( n-1 ) ) )
283 temp = two*( dzsum1( n, x, 1 ) / dble( 3*n ) )
284 IF( temp.GT.est )
THEN
285 CALL zcopy( n, x, 1, v, 1 )
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zlacn2(n, v, x, est, kase, isave)
ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...