107 SUBROUTINE dlaed5( I, D, Z, DELTA, RHO, DLAM )
115 DOUBLE PRECISION DLAM, RHO
118 DOUBLE PRECISION D( 2 ), DELTA( 2 ), Z( 2 )
124 DOUBLE PRECISION ZERO, ONE, TWO, FOUR
125 parameter( zero = 0.0d0, one = 1.0d0, two = 2.0d0,
129 DOUBLE PRECISION B, C, DEL, TAU, TEMP, W
136 del = d( 2 ) - d( 1 )
138 w = one + two*rho*( z( 2 )*z( 2 )-z( 1 )*z( 1 ) ) / del
140 b = del + rho*( z( 1 )*z( 1 )+z( 2 )*z( 2 ) )
141 c = rho*z( 1 )*z( 1 )*del
145 tau = two*c / ( b+sqrt( abs( b*b-four*c ) ) )
147 delta( 1 ) = -z( 1 ) / tau
148 delta( 2 ) = z( 2 ) / ( del-tau )
150 b = -del + rho*( z( 1 )*z( 1 )+z( 2 )*z( 2 ) )
151 c = rho*z( 2 )*z( 2 )*del
153 tau = -two*c / ( b+sqrt( b*b+four*c ) )
155 tau = ( b-sqrt( b*b+four*c ) ) / two
158 delta( 1 ) = -z( 1 ) / ( del+tau )
159 delta( 2 ) = -z( 2 ) / tau
161 temp = sqrt( delta( 1 )*delta( 1 )+delta( 2 )*delta( 2 ) )
162 delta( 1 ) = delta( 1 ) / temp
163 delta( 2 ) = delta( 2 ) / temp
168 b = -del + rho*( z( 1 )*z( 1 )+z( 2 )*z( 2 ) )
169 c = rho*z( 2 )*z( 2 )*del
171 tau = ( b+sqrt( b*b+four*c ) ) / two
173 tau = two*c / ( -b+sqrt( b*b+four*c ) )
176 delta( 1 ) = -z( 1 ) / ( del+tau )
177 delta( 2 ) = -z( 2 ) / tau
178 temp = sqrt( delta( 1 )*delta( 1 )+delta( 2 )*delta( 2 ) )
179 delta( 1 ) = delta( 1 ) / temp
180 delta( 2 ) = delta( 2 ) / temp
subroutine dlaed5(i, d, z, delta, rho, dlam)
DLAED5 used by DSTEDC. Solves the 2-by-2 secular equation.