134 SUBROUTINE zlacn2( N, V, X, EST, KASE, ISAVE )
147 COMPLEX*16 V( * ), X( * )
154 parameter ( itmax = 5 )
155 DOUBLE PRECISION ONE, TWO
156 parameter ( one = 1.0d0, two = 2.0d0 )
157 COMPLEX*16 CZERO, CONE
158 parameter ( czero = ( 0.0d0, 0.0d0 ),
159 $ cone = ( 1.0d0, 0.0d0 ) )
163 DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
167 DOUBLE PRECISION DLAMCH, DZSUM1
168 EXTERNAL izmax1, dlamch, dzsum1
174 INTRINSIC abs, dble, dcmplx, dimag
178 safmin = dlamch(
'Safe minimum' )
181 x( i ) = dcmplx( one / dble( n ) )
188 GO TO ( 20, 40, 70, 90, 120 )isave( 1 )
200 est = dzsum1( n, x, 1 )
203 absxi = abs( x( i ) )
204 IF( absxi.GT.safmin )
THEN
205 x( i ) = dcmplx( dble( x( i ) ) / absxi,
206 $ dimag( x( i ) ) / absxi )
219 isave( 2 ) = izmax1( n, x, 1 )
228 x( isave( 2 ) ) = cone
237 CALL zcopy( n, x, 1, v, 1 )
239 est = dzsum1( n, v, 1 )
246 absxi = abs( x( i ) )
247 IF( absxi.GT.safmin )
THEN
248 x( i ) = dcmplx( dble( x( i ) ) / absxi,
249 $ dimag( x( i ) ) / absxi )
263 isave( 2 ) = izmax1( n, x, 1 )
264 IF( ( abs( x( jlast ) ).NE.abs( x( isave( 2 ) ) ) ) .AND.
265 $ ( isave( 3 ).LT.itmax ) )
THEN
266 isave( 3 ) = isave( 3 ) + 1
275 x( i ) = dcmplx( altsgn*( one+dble( i-1 ) / dble( n-1 ) ) )
286 temp = two*( dzsum1( n, x, 1 ) / dble( 3*n ) )
287 IF( temp.GT.est )
THEN
288 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...