132 SUBROUTINE clacn2( N, V, X, EST, KASE, ISAVE )
144 COMPLEX V( * ), X( * )
151 parameter( itmax = 5 )
153 parameter( one = 1.0e0, two = 2.0e0 )
155 parameter( czero = ( 0.0e0, 0.0e0 ),
156 $ cone = ( 1.0e0, 0.0e0 ) )
160 REAL ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
165 EXTERNAL icmax1, scsum1, slamch
171 INTRINSIC abs, aimag, cmplx, real
175 safmin = slamch(
'Safe minimum' )
178 x( i ) = cmplx( one / real( n ) )
185 GO TO ( 20, 40, 70, 90, 120 )isave( 1 )
197 est = scsum1( n, x, 1 )
200 absxi = abs( x( i ) )
201 IF( absxi.GT.safmin )
THEN
202 x( i ) = cmplx( real( x( i ) ) / absxi,
203 $ aimag( x( i ) ) / absxi )
216 isave( 2 ) = icmax1( n, x, 1 )
225 x( isave( 2 ) ) = cone
234 CALL ccopy( n, x, 1, v, 1 )
236 est = scsum1( n, v, 1 )
243 absxi = abs( x( i ) )
244 IF( absxi.GT.safmin )
THEN
245 x( i ) = cmplx( real( x( i ) ) / absxi,
246 $ aimag( x( i ) ) / absxi )
260 isave( 2 ) = icmax1( 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 ) = cmplx( altsgn*( one + real( i-1 ) / real( n-1 ) ) )
283 temp = two*( scsum1( n, x, 1 ) / real( 3*n ) )
284 IF( temp.GT.est )
THEN
285 CALL ccopy( n, x, 1, v, 1 )
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine clacn2(n, v, x, est, kase, isave)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...