124 COMPLEX V( N ), X( N )
131 parameter( itmax = 5 )
133 parameter( one = 1.0e0, two = 2.0e0 )
135 parameter( czero = ( 0.0e0, 0.0e0 ),
136 $ cone = ( 1.0e0, 0.0e0 ) )
139 INTEGER I, ITER, J, JLAST, JUMP
140 REAL ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
145 EXTERNAL icmax1, scsum1, slamch
151 INTRINSIC abs, aimag, cmplx, real
158 safmin = slamch(
'Safe minimum' )
161 x( i ) = cmplx( one / real( n ) )
168 GO TO ( 20, 40, 70, 90, 120 )jump
180 est = scsum1( n, x, 1 )
183 absxi = abs( x( i ) )
184 IF( absxi.GT.safmin )
THEN
185 x( i ) = cmplx( real( x( i ) ) / absxi,
186 $ aimag( x( i ) ) / absxi )
199 j = icmax1( n, x, 1 )
217 CALL ccopy( n, x, 1, v, 1 )
219 est = scsum1( n, v, 1 )
226 absxi = abs( x( i ) )
227 IF( absxi.GT.safmin )
THEN
228 x( i ) = cmplx( real( x( i ) ) / absxi,
229 $ aimag( x( i ) ) / absxi )
243 j = icmax1( n, x, 1 )
244 IF( ( abs( x( jlast ) ).NE.abs( x( j ) ) ) .AND.
245 $ ( iter.LT.itmax ) )
THEN
255 x( i ) = cmplx( altsgn*( one+real( i-1 ) / real( n-1 ) ) )
266 temp = two*( scsum1( n, x, 1 ) / real( 3*n ) )
267 IF( temp.GT.est )
THEN
268 CALL ccopy( n, x, 1, v, 1 )
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine clacon(n, v, x, est, kase)
CLACON estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...