137 SUBROUTINE dlacn2( N, V, X, ISGN, EST, KASE, ISAVE )
149 INTEGER ISGN( * ), ISAVE( 3 )
150 DOUBLE PRECISION V( * ), X( * )
157 parameter ( itmax = 5 )
158 DOUBLE PRECISION ZERO, ONE, TWO
159 parameter ( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
163 DOUBLE PRECISION ALTSGN, ESTOLD, TEMP
167 DOUBLE PRECISION DASUM
168 EXTERNAL idamax, dasum
174 INTRINSIC abs, dble, nint, sign
180 x( i ) = one / dble( n )
187 GO TO ( 20, 40, 70, 110, 140 )isave( 1 )
199 est = dasum( n, x, 1 )
202 x( i ) = sign( one, x( i ) )
203 isgn( i ) = nint( x( i ) )
213 isave( 2 ) = idamax( n, x, 1 )
222 x( isave( 2 ) ) = one
231 CALL dcopy( n, x, 1, v, 1 )
233 est = dasum( n, v, 1 )
235 IF( nint( sign( one, x( i ) ) ).NE.isgn( i ) )
247 x( i ) = sign( one, x( i ) )
248 isgn( i ) = nint( x( i ) )
259 isave( 2 ) = idamax( n, x, 1 )
260 IF( ( x( jlast ).NE.abs( x( isave( 2 ) ) ) ) .AND.
261 $ ( isave( 3 ).LT.itmax ) )
THEN
262 isave( 3 ) = isave( 3 ) + 1
271 x( i ) = altsgn*( one+dble( i-1 ) / dble( n-1 ) )
282 temp = two*( dasum( n, x, 1 ) / dble( 3*n ) )
283 IF( temp.GT.est )
THEN
284 CALL dcopy( n, x, 1, v, 1 )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine dlacn2(N, V, X, ISGN, EST, KASE, ISAVE)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...