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
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 ) )