128 SUBROUTINE dlanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
136 DOUBLE PRECISION A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
142 DOUBLE PRECISION ZERO, HALF, ONE
143 parameter ( zero = 0.0d+0, half = 0.5d+0, one = 1.0d+0 )
144 DOUBLE PRECISION MULTPL
145 parameter ( multpl = 4.0d+0 )
148 DOUBLE PRECISION AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB,
149 $ sac, scale, sigma, sn1, tau, temp, z
152 DOUBLE PRECISION DLAMCH, DLAPY2
153 EXTERNAL dlamch, dlapy2
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.sign( one, c ) )
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 = dlapy2( 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 dlanv2(A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN)
DLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric matrix in standard form...