144 SUBROUTINE dlasq5( I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1, DMIN2,
145 $ dn, dnm1, dnm2, ieee, eps )
155 DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, TAU,
159 DOUBLE PRECISION Z( * )
165 DOUBLE PRECISION ZERO, HALF
166 parameter ( zero = 0.0d0, half = 0.5 )
170 DOUBLE PRECISION D, EMIN, TEMP, DTHRESH
177 IF( ( n0-i0-1 ).LE.0 )
180 dthresh = eps*(sigma+tau)
181 IF( tau.LT.dthresh*half ) tau = zero
182 IF( tau.NE.zero )
THEN
194 DO 10 j4 = 4*i0, 4*( n0-3 ), 4
195 z( j4-2 ) = d + z( j4-1 )
196 temp = z( j4+1 ) / z( j4-2 )
198 dmin = min( dmin, d )
199 z( j4 ) = z( j4-1 )*temp
200 emin = min( z( j4 ), emin )
203 DO 20 j4 = 4*i0, 4*( n0-3 ), 4
204 z( j4-3 ) = d + z( j4 )
205 temp = z( j4+2 ) / z( j4-3 )
207 dmin = min( dmin, d )
208 z( j4-1 ) = z( j4 )*temp
209 emin = min( z( j4-1 ), emin )
219 z( j4-2 ) = dnm2 + z( j4p2 )
220 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
221 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
222 dmin = min( dmin, dnm1 )
227 z( j4-2 ) = dnm1 + z( j4p2 )
228 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
229 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
230 dmin = min( dmin, dn )
237 DO 30 j4 = 4*i0, 4*( n0-3 ), 4
238 z( j4-2 ) = d + z( j4-1 )
242 z( j4 ) = z( j4+1 )*( z( j4-1 ) / z( j4-2 ) )
243 d = z( j4+1 )*( d / z( j4-2 ) ) - tau
245 dmin = min( dmin, d )
246 emin = min( emin, z( j4 ) )
249 DO 40 j4 = 4*i0, 4*( n0-3 ), 4
250 z( j4-3 ) = d + z( j4 )
254 z( j4-1 ) = z( j4+2 )*( z( j4 ) / z( j4-3 ) )
255 d = z( j4+2 )*( d / z( j4-3 ) ) - tau
257 dmin = min( dmin, d )
258 emin = min( emin, z( j4-1 ) )
268 z( j4-2 ) = dnm2 + z( j4p2 )
269 IF( dnm2.LT.zero )
THEN
272 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
273 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
275 dmin = min( dmin, dnm1 )
280 z( j4-2 ) = dnm1 + z( j4p2 )
281 IF( dnm1.LT.zero )
THEN
284 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
285 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
287 dmin = min( dmin, dn )
302 DO 50 j4 = 4*i0, 4*( n0-3 ), 4
303 z( j4-2 ) = d + z( j4-1 )
304 temp = z( j4+1 ) / z( j4-2 )
306 IF( d.LT.dthresh ) d = zero
307 dmin = min( dmin, d )
308 z( j4 ) = z( j4-1 )*temp
309 emin = min( z( j4 ), emin )
312 DO 60 j4 = 4*i0, 4*( n0-3 ), 4
313 z( j4-3 ) = d + z( j4 )
314 temp = z( j4+2 ) / z( j4-3 )
316 IF( d.LT.dthresh ) d = zero
317 dmin = min( dmin, d )
318 z( j4-1 ) = z( j4 )*temp
319 emin = min( z( j4-1 ), emin )
329 z( j4-2 ) = dnm2 + z( j4p2 )
330 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
331 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
332 dmin = min( dmin, dnm1 )
337 z( j4-2 ) = dnm1 + z( j4p2 )
338 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
339 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
340 dmin = min( dmin, dn )
347 DO 70 j4 = 4*i0, 4*( n0-3 ), 4
348 z( j4-2 ) = d + z( j4-1 )
352 z( j4 ) = z( j4+1 )*( z( j4-1 ) / z( j4-2 ) )
353 d = z( j4+1 )*( d / z( j4-2 ) ) - tau
355 IF( d.LT.dthresh) d = zero
356 dmin = min( dmin, d )
357 emin = min( emin, z( j4 ) )
360 DO 80 j4 = 4*i0, 4*( n0-3 ), 4
361 z( j4-3 ) = d + z( j4 )
365 z( j4-1 ) = z( j4+2 )*( z( j4 ) / z( j4-3 ) )
366 d = z( j4+2 )*( d / z( j4-3 ) ) - tau
368 IF( d.LT.dthresh) d = zero
369 dmin = min( dmin, d )
370 emin = min( emin, z( j4-1 ) )
380 z( j4-2 ) = dnm2 + z( j4p2 )
381 IF( dnm2.LT.zero )
THEN
384 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
385 dnm1 = z( j4p2+2 )*( dnm2 / z( j4-2 ) ) - tau
387 dmin = min( dmin, dnm1 )
392 z( j4-2 ) = dnm1 + z( j4p2 )
393 IF( dnm1.LT.zero )
THEN
396 z( j4 ) = z( j4p2+2 )*( z( j4p2 ) / z( j4-2 ) )
397 dn = z( j4p2+2 )*( dnm1 / z( j4-2 ) ) - tau
399 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.