162 SUBROUTINE slasd8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
163 $ DSIGMA, WORK, INFO )
170 INTEGER ICOMPQ, INFO, K, LDDIFR
173 REAL D( * ), DIFL( * ), DIFR( LDDIFR, * ),
174 $ dsigma( * ), vf( * ), vl( * ), work( * ),
182 parameter( one = 1.0e+0 )
185 INTEGER I, IWK1, IWK2, IWK2I, IWK3, IWK3I, J
186 REAL DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, RHO, TEMP
192 REAL SDOT, SLAMC3, SNRM2
193 EXTERNAL sdot, slamc3, snrm2
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(
'SLASD8', -info )
219 d( 1 ) = abs( z( 1 ) )
221 IF( icompq.EQ.1 )
THEN
238 rho = snrm2( k, z, 1 )
239 CALL slascl(
'G', 0, 0, rho, one, k, 1, z, k, info )
244 CALL slaset(
'A', k, 1, one, one, work( iwk3 ), k )
250 CALL slasd4( 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 ) / ( slamc3( dsigma( i ), dsigj )-diflj )
299 $ / ( dsigma( i )+dj )
302 work( i ) = z( i ) / ( slamc3( dsigma( i ), dsigjp )+difrj )
303 $ / ( dsigma( i )+dj )
305 temp = snrm2( k, work, 1 )
306 work( iwk2i+j ) = sdot( k, work, 1, vf, 1 ) / temp
307 work( iwk3i+j ) = sdot( k, work, 1, vl, 1 ) / temp
308 IF( icompq.EQ.1 )
THEN
313 CALL scopy( k, work( iwk2 ), 1, vf, 1 )
314 CALL scopy( k, work( iwk3 ), 1, vl, 1 )
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine slascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
SLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine slasd4(n, i, d, z, delta, rho, sigma, work, info)
SLASD4 computes the square root of the i-th updated eigenvalue of a positive symmetric rank-one modif...
subroutine slasd8(icompq, k, d, z, vf, vl, difl, difr, lddifr, dsigma, work, info)
SLASD8 finds the square roots of the roots of the secular equation, and stores, for each element in D...
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.