140 SUBROUTINE dlasq5( I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1,
142 $ DN, DNM1, DNM2, IEEE, EPS )
151 DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, TAU,
155 DOUBLE PRECISION Z( * )
161 DOUBLE PRECISION ZERO, HALF
162 PARAMETER ( ZERO = 0.0d0, half = 0.5 )
166 DOUBLE PRECISION D, EMIN, TEMP, DTHRESH
173 IF( ( n0-i0-1 ).LE.0 )
176 dthresh = eps*(sigma+tau)
177 IF( tau.LT.dthresh*half ) tau = zero
178 IF( tau.NE.zero )
THEN
190 DO 10 j4 = 4*i0, 4*( n0-3 ), 4
191 z( j4-2 ) = d + z( j4-1 )
192 temp = z( j4+1 ) / z( j4-2 )
194 dmin = min( dmin, d )
195 z( j4 ) = z( j4-1 )*temp
196 emin = min( z( j4 ), emin )
199 DO 20 j4 = 4*i0, 4*( n0-3 ), 4
200 z( j4-3 ) = d + z( j4 )
201 temp = z( j4+2 ) / z( j4-3 )
203 dmin = min( dmin, d )
204 z( j4-1 ) = z( j4 )*temp
205 emin = min( z( j4-1 ), emin )
215 z( j4-2 ) = dnm2 + z( j4p2 )
216 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
217 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
218 dmin = min( dmin, dnm1 )
223 z( j4-2 ) = dnm1 + z( j4p2 )
224 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
225 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
226 dmin = min( dmin, dn )
233 DO 30 j4 = 4*i0, 4*( n0-3 ), 4
234 z( j4-2 ) = d + z( j4-1 )
238 z( j4 ) = z( j4+1 )*( z( j4-1 ) / z( j4-2 ) )
239 d = z( j4+1 )*( d / z( j4-2 ) ) - tau
241 dmin = min( dmin, d )
242 emin = min( emin, z( j4 ) )
245 DO 40 j4 = 4*i0, 4*( n0-3 ), 4
246 z( j4-3 ) = d + z( j4 )
250 z( j4-1 ) = z( j4+2 )*( z( j4 ) / z( j4-3 ) )
251 d = z( j4+2 )*( d / z( j4-3 ) ) - tau
253 dmin = min( dmin, d )
254 emin = min( emin, z( j4-1 ) )
264 z( j4-2 ) = dnm2 + z( j4p2 )
265 IF( dnm2.LT.zero )
THEN
268 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
269 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
271 dmin = min( dmin, dnm1 )
276 z( j4-2 ) = dnm1 + z( j4p2 )
277 IF( dnm1.LT.zero )
THEN
280 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
281 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
283 dmin = min( dmin, dn )
298 DO 50 j4 = 4*i0, 4*( n0-3 ), 4
299 z( j4-2 ) = d + z( j4-1 )
300 temp = z( j4+1 ) / z( j4-2 )
302 IF( d.LT.dthresh ) d = zero
303 dmin = min( dmin, d )
304 z( j4 ) = z( j4-1 )*temp
305 emin = min( z( j4 ), emin )
308 DO 60 j4 = 4*i0, 4*( n0-3 ), 4
309 z( j4-3 ) = d + z( j4 )
310 temp = z( j4+2 ) / z( j4-3 )
312 IF( d.LT.dthresh ) d = zero
313 dmin = min( dmin, d )
314 z( j4-1 ) = z( j4 )*temp
315 emin = min( z( j4-1 ), emin )
325 z( j4-2 ) = dnm2 + z( j4p2 )
326 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
327 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
328 dmin = min( dmin, dnm1 )
333 z( j4-2 ) = dnm1 + z( j4p2 )
334 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
335 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
336 dmin = min( dmin, dn )
343 DO 70 j4 = 4*i0, 4*( n0-3 ), 4
344 z( j4-2 ) = d + z( j4-1 )
348 z( j4 ) = z( j4+1 )*( z( j4-1 ) / z( j4-2 ) )
349 d = z( j4+1 )*( d / z( j4-2 ) ) - tau
351 IF( d.LT.dthresh) d = zero
352 dmin = min( dmin, d )
353 emin = min( emin, z( j4 ) )
356 DO 80 j4 = 4*i0, 4*( n0-3 ), 4
357 z( j4-3 ) = d + z( j4 )
361 z( j4-1 ) = z( j4+2 )*( z( j4 ) / z( j4-3 ) )
362 d = z( j4+2 )*( d / z( j4-3 ) ) - tau
364 IF( d.LT.dthresh) d = zero
365 dmin = min( dmin, d )
366 emin = min( emin, z( j4-1 ) )
376 z( j4-2 ) = dnm2 + z( j4p2 )
377 IF( dnm2.LT.zero )
THEN
380 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
381 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
383 dmin = min( dmin, dnm1 )
388 z( j4-2 ) = dnm1 + z( j4p2 )
389 IF( dnm1.LT.zero )
THEN
392 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
393 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
395 dmin = min( dmin, dn )
subroutine dlasq5(i0, n0, z, pp, tau, sigma, dmin, dmin1, dmin2, dn, dnm1, dnm2, ieee, eps)
DLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr.