134 SUBROUTINE clacn2( N, V, X, EST, KASE, ISAVE )
147 COMPLEX v( * ), x( * )
154 parameter( itmax = 5 )
156 parameter( one = 1.0e0, two = 2.0e0 )
158 parameter( czero = ( 0.0e0, 0.0e0 ),
159 $ cone = ( 1.0e0, 0.0e0 ) )
163 REAL absxi, altsgn, estold, safmin, temp
174 INTRINSIC abs, aimag, cmplx, real
178 safmin =
slamch(
'Safe minimum' )
181 x( i ) = cmplx( one /
REAL( N ) )
188 go to( 20, 40, 70, 90, 120 )isave( 1 )
203 absxi = abs( x( i ) )
204 IF( absxi.GT.safmin )
THEN
205 x( i ) = cmplx(
REAL( X( I ) ) / absxi,
206 $ aimag( x( i ) ) / absxi )
219 isave( 2 ) =
icmax1( n, x, 1 )
228 x( isave( 2 ) ) = cone
237 CALL
ccopy( n, x, 1, v, 1 )
246 absxi = abs( x( i ) )
247 IF( absxi.GT.safmin )
THEN
248 x( i ) = cmplx(
REAL( X( I ) ) / absxi,
249 $ aimag( x( i ) ) / absxi )
263 isave( 2 ) =
icmax1( 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 ) = cmplx( altsgn*( one +
REAL( I-1 ) /
REAL( N-1 ) ) )
286 temp = two*(
scsum1( n, x, 1 ) /
REAL( 3*N ) )
287 IF( temp.GT.est )
THEN
288 CALL
ccopy( n, x, 1, v, 1 )