128 SUBROUTINE slanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
136 REAL A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
143 parameter ( zero = 0.0e+0, half = 0.5e+0, one = 1.0e+0 )
145 parameter ( multpl = 4.0e+0 )
148 REAL AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB,
149 $ sac, scale, sigma, sn1, tau, temp, z
153 EXTERNAL slamch, slapy2
156 INTRINSIC abs, max, min, sign, sqrt
166 ELSE IF( b.EQ.zero )
THEN
178 ELSE IF( (a-d).EQ.zero .AND. sign( one, b ).NE.
179 $ sign( one, c ) )
THEN
187 bcmax = max( abs( b ), abs( c ) )
188 bcmis = min( abs( b ), abs( c ) )*sign( one, b )*sign( one, c )
189 scale = max( abs( p ), bcmax )
190 z = ( p / scale )*p + ( bcmax / scale )*bcmis
195 IF( z.GE.multpl*eps )
THEN
199 z = p + sign( sqrt( scale )*sqrt( z ), p )
201 d = d - ( bcmax / z )*bcmis
216 tau = slapy2( sigma, temp )
217 cs = sqrt( half*( one+abs( sigma ) / tau ) )
218 sn = -( p / ( tau*cs ) )*sign( one, sigma )
242 IF( sign( one, b ).EQ.sign( one, c ) )
THEN
246 sab = sqrt( abs( b ) )
247 sac = sqrt( abs( c ) )
248 p = sign( sab*sac, c )
249 tau = one / sqrt( abs( b+c ) )
256 temp = cs*cs1 - sn*sn1
282 rt1i = sqrt( abs( b ) )*sqrt( abs( c ) )
subroutine slanv2(A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN)
SLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric matrix in standard form...