162 SUBROUTINE dlasd8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
163 $ DSIGMA, WORK, INFO )
170 INTEGER ICOMPQ, INFO, K, LDDIFR
173 DOUBLE PRECISION D( * ), DIFL( * ), DIFR( LDDIFR, * ),
174 $ dsigma( * ), vf( * ), vl( * ), work( * ),
182 parameter( one = 1.0d+0 )
185 INTEGER I, IWK1, IWK2, IWK2I, IWK3, IWK3I, J
186 DOUBLE PRECISION DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, RHO, TEMP
192 DOUBLE PRECISION DDOT, DLAMC3, DNRM2
193 EXTERNAL ddot, dlamc3, dnrm2
196 INTRINSIC abs, sign, sqrt
204 IF( ( icompq.LT.0 ) .OR. ( icompq.GT.1 ) )
THEN
206 ELSE IF( k.LT.1 )
THEN
208 ELSE IF( lddifr.LT.k )
THEN
212 CALL xerbla(
'DLASD8', -info )
219 d( 1 ) = abs( z( 1 ) )
221 IF( icompq.EQ.1 )
THEN
238 rho = dnrm2( k, z, 1 )
239 CALL dlascl(
'G', 0, 0, rho, one, k, 1, z, k, info )
244 CALL dlaset(
'A', k, 1, one, one, work( iwk3 ), k )
250 CALL dlasd4( k, j, dsigma, z, work( iwk1 ), rho, d( j ),
251 $ work( iwk2 ), info )
258 work( iwk3i+j ) = work( iwk3i+j )*work( j )*work( iwk2i+j )
259 difl( j ) = -work( j )
260 difr( j, 1 ) = -work( j+1 )
262 work( iwk3i+i ) = work( iwk3i+i )*work( i )*
263 $ work( iwk2i+i ) / ( dsigma( i )-
264 $ dsigma( j ) ) / ( dsigma( i )+
268 work( iwk3i+i ) = work( iwk3i+i )*work( i )*
269 $ work( iwk2i+i ) / ( dsigma( i )-
270 $ dsigma( j ) ) / ( dsigma( i )+
278 z( i ) = sign( sqrt( abs( work( iwk3i+i ) ) ), z( i ) )
288 difrj = -difr( j, 1 )
289 dsigjp = -dsigma( j+1 )
291 work( j ) = -z( j ) / diflj / ( dsigma( j )+dj )
298 work( i ) = z( i ) / ( dlamc3( dsigma( i ), dsigj )-diflj )
299 $ / ( dsigma( i )+dj )
302 work( i ) = z( i ) / ( dlamc3( dsigma( i ), dsigjp )+difrj )
303 $ / ( dsigma( i )+dj )
305 temp = dnrm2( k, work, 1 )
306 work( iwk2i+j ) = ddot( k, work, 1, vf, 1 ) / temp
307 work( iwk3i+j ) = ddot( k, work, 1, vl, 1 ) / temp
308 IF( icompq.EQ.1 )
THEN
313 CALL dcopy( k, work( iwk2 ), 1, vf, 1 )
314 CALL dcopy( k, work( iwk3 ), 1, vl, 1 )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine dlasd4(n, i, d, z, delta, rho, sigma, work, info)
DLASD4 computes the square root of the i-th updated eigenvalue of a positive symmetric rank-one modif...
subroutine dlasd8(icompq, k, d, z, vf, vl, difl, difr, lddifr, dsigma, work, info)
DLASD8 finds the square roots of the roots of the secular equation, and stores, for each element in D...
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.