1 SUBROUTINE zlanv2( A, B, C, D, RT1, RT2, CS, SN )
10 COMPLEX*16 A, B, , D, RT1, RT2, SN
49 DOUBLE PRECISION RZERO, HALF,
53 parameter( zero = ( 0.0d+0, 0.0d+0 ),
54 $ one = ( 1.0d+0, 0.0d+0 ) )
67 INTRINSIC dble, dcmplx, dconjg, dimag, sqrt
79 ELSE IF( b.EQ.zero )
THEN
91 ELSE IF( ( a-d ).EQ.zero )
THEN
95 IF( ( b+c ).EQ.zero )
THEN
97 sn = dcmplx( rzero, rone )*cs
100 temp2 = zladiv( sqrt( b ), temp )
102 sn = zladiv( sqrt( c ), temp )
115 IF( dble( x )*dble( y )+dimag( x )*dimag( y ).LT.rzero )
117 t = t - zladiv( u, ( x+y ) )
122 CALL zlartg( a-t, c, cs, sn, aa )
126 dd = -dconjg( sn )*b + cs*d
128 a = aa*cs + bb*dconjg( sn ) + t
subroutine zlartg(f, g, c, s, r)
ZLARTG generates a plane rotation with real cosine and complex sine.
subroutine zlanv2(a, b, c, d, rt1, rt2, cs, sn)