134 SUBROUTINE zlacn2( N, V, X, EST, KASE, ISAVE )
147 COMPLEX*16 v( * ),
x( * )
154 parameter( itmax = 5 )
155 DOUBLE PRECISION one, two
156 parameter( one = 1.0d0, two = 2.0d0 )
157 COMPLEX*16 czero, cone
158 parameter( czero = ( 0.0d0, 0.0d0 ),
159 $ cone = ( 1.0d0, 0.0d0 ) )
163 DOUBLE PRECISION absxi, altsgn, estold, safmin, temp
174 INTRINSIC abs, dble, dcmplx, dimag
178 safmin =
dlamch(
'Safe minimum' )
181 x( i ) = dcmplx( one / dble( 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 ) = dcmplx( dble(
x( i ) ) / absxi,
206 $ dimag(
x( i ) ) / absxi )
228 x( isave( 2 ) ) = cone
237 CALL
zcopy( n,
x, 1, v, 1 )
246 absxi = abs(
x( i ) )
247 IF( absxi.GT.safmin )
THEN
248 x( i ) = dcmplx( dble(
x( i ) ) / absxi,
249 $ dimag(
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 ) = dcmplx( altsgn*( one+dble( i-1 ) / dble( n-1 ) ) )
286 temp = two*(
dzsum1( n,
x, 1 ) / dble( 3*n ) )
287 IF( temp.GT.est )
THEN
288 CALL
zcopy( n,
x, 1, v, 1 )
subroutine zlacn2(N, V, X, EST, KASE, ISAVE)
ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
DOUBLE PRECISION function dzsum1(N, CX, INCX)
DZSUM1 forms the 1-norm of the complex vector using the true absolute value.
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
DOUBLE PRECISION function dlamch(CMACH)
DLAMCH
INTEGER function izmax1(N, CX, INCX)
IZMAX1 finds the index of the vector element whose real part has maximum absolute value...