123 SUBROUTINE zlargv( N, X, INCX, Y, INCY, C, INCC )
131 INTEGER incc, incx, incy, n
134 DOUBLE PRECISION c( * )
135 COMPLEX*16 x( * ), y( * )
141 DOUBLE PRECISION two, one, zero
142 parameter( two = 2.0d+0, one = 1.0d+0, zero = 0.0d+0 )
144 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
149 INTEGER count, i, ic, ix, iy, j
150 DOUBLE PRECISION cs, d, di, dr, eps, f2, f2s, g2, g2s, safmin,
151 $ safmn2, safmx2, scale
152 COMPLEX*16 f, ff, fs, g, gs, r, sn
159 INTRINSIC abs, dble, dcmplx, dconjg, dimag, int, log,
163 DOUBLE PRECISION abs1, abssq
172 abs1( ff ) = max( abs( dble( ff ) ), abs( dimag( ff ) ) )
173 abssq( ff ) = dble( ff )**2 + dimag( ff )**2
181 safmn2 =
dlamch(
'B' )**int( log( safmin / eps ) /
182 $ log(
dlamch(
'B' ) ) / two )
183 safmx2 = one / safmn2
194 scale = max( abs1( f ), abs1( g ) )
198 IF( scale.GE.safmx2 )
THEN
204 IF( scale.GE.safmx2 )
206 ELSE IF( scale.LE.safmn2 )
THEN
207 IF( g.EQ.czero )
THEN
218 IF( scale.LE.safmn2 )
223 IF( f2.LE.max( g2, one )*safmin )
THEN
227 IF( f.EQ.czero )
THEN
229 r =
dlapy2( dble( g ), dimag( g ) )
232 d =
dlapy2( dble( gs ), dimag( gs ) )
233 sn = dcmplx( dble( gs ) / d, -dimag( gs ) / d )
236 f2s =
dlapy2( dble( fs ), dimag( fs ) )
250 IF( abs1( f ).GT.one )
THEN
251 d =
dlapy2( dble( f ), dimag( f ) )
252 ff = dcmplx( dble( f ) / d, dimag( f ) / d )
254 dr = safmx2*dble( f )
255 di = safmx2*dimag( f )
257 ff = dcmplx( dr / d, di / d )
259 sn = ff*dcmplx( dble( gs ) / g2s, -dimag( gs ) / g2s )
267 f2s = sqrt( one+g2 / f2 )
270 r = dcmplx( f2s*dble( fs ), f2s*dimag( fs ) )
274 sn = dcmplx( dble( r ) / d, dimag( r ) / d )
276 IF( count.NE.0 )
THEN
277 IF( count.GT.0 )
THEN