130 SUBROUTINE clacn2( N, V, X, EST, KASE, ISAVE )
142 COMPLEX V( * ), X( * )
149 parameter( itmax = 5 )
151 parameter( one = 1.0e0, two = 2.0e0 )
153 parameter( czero = ( 0.0e0, 0.0e0 ),
154 $ cone = ( 1.0e0, 0.0e0 ) )
158 REAL ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
163 EXTERNAL icmax1, scsum1, slamch
169 INTRINSIC abs, aimag, cmplx, real
173 safmin = slamch(
'Safe minimum' )
176 x( i ) = cmplx( one / real( n ) )
183 GO TO ( 20, 40, 70, 90, 120 )isave( 1 )
195 est = scsum1( n, x, 1 )
198 absxi = abs( x( i ) )
199 IF( absxi.GT.safmin )
THEN
200 x( i ) = cmplx( real( x( i ) ) / absxi,
201 $ aimag( x( i ) ) / absxi )
214 isave( 2 ) = icmax1( n, x, 1 )
223 x( isave( 2 ) ) = cone
232 CALL ccopy( n, x, 1, v, 1 )
234 est = scsum1( n, v, 1 )
241 absxi = abs( x( i ) )
242 IF( absxi.GT.safmin )
THEN
243 x( i ) = cmplx( real( x( i ) ) / absxi,
244 $ aimag( x( i ) ) / absxi )
258 isave( 2 ) = icmax1( n, x, 1 )
259 IF( ( abs( x( jlast ) ).NE.abs( x( isave( 2 ) ) ) ) .AND.
260 $ ( isave( 3 ).LT.itmax ) )
THEN
261 isave( 3 ) = isave( 3 ) + 1
270 x( i ) = cmplx( altsgn*( one + real( i-1 ) / real( n-1 ) ) )
281 temp = two*( scsum1( n, x, 1 ) / real( 3*n ) )
282 IF( temp.GT.est )
THEN
283 CALL ccopy( n, x, 1, v, 1 )
subroutine clacn2(n, v, x, est, kase, isave)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...