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 )
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 )
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 )
REAL function slamch(CMACH)
SLAMCH
REAL function scsum1(N, CX, INCX)
SCSUM1 forms the 1-norm of the complex vector using the true absolute value.
INTEGER function icmax1(N, CX, INCX)
ICMAX1 finds the index of the vector element whose real part has maximum absolute value...
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...