1 SUBROUTINE clanv2( A, B, C, D, RT1, RT2, CS, SN )
10 COMPLEX A, B, C, D, RT1, RT2, SN
49 REAL RZERO, HALF, RONE
50 parameter( rzero = 0.0e+0, half = 0.5e+0,
53 parameter( zero = ( 0.0e+0, 0.0e+0 ),
54 $ one = ( 1.0e+0, 0.0e+0 ) )
57 COMPLEX AA, BB, DD, T, TEMP, TEMP2, U, X, Y
67 INTRINSIC real,
cmplx, conjg, aimag, 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 =
cmplx( rzero, rone )*cs
100 temp2 = cladiv( sqrt( b ), temp )
102 sn = cladiv( sqrt( c ), temp )
115 IF( real( x )*real( y )+aimag( x )*aimag( y ).LT.rzero )
117 t = t - cladiv( u, ( x+y ) )
122 CALL clartg( a-t, c, cs, sn, aa )
126 dd = -conjg( sn )*b + cs*d
128 a = aa*cs + bb*conjg( sn ) + t