174 SUBROUTINE dsytd2( UPLO, N, A, LDA, D, E, TAU, INFO )
186 DOUBLE PRECISION a( lda, * ), d( * ), e( * ), tau( * )
192 DOUBLE PRECISION one, zero, half
193 parameter( one = 1.0d0, zero = 0.0d0,
194 $ half = 1.0d0 / 2.0d0 )
199 DOUBLE PRECISION alpha, taui
206 DOUBLE PRECISION ddot
217 upper =
lsame( uplo,
'U' )
218 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
220 ELSE IF( n.LT.0 )
THEN
222 ELSE IF( lda.LT.max( 1, n ) )
THEN
226 CALL
xerbla(
'DSYTD2', -info )
239 DO 10 i = n - 1, 1, -1
244 CALL
dlarfg( i, a( i, i+1 ), a( 1, i+1 ), 1, taui )
247 IF( taui.NE.zero )
THEN
255 CALL
dsymv( uplo, i, taui, a, lda, a( 1, i+1 ), 1, zero,
260 alpha = -half*taui*
ddot( i, tau, 1, a( 1, i+1 ), 1 )
261 CALL
daxpy( i, alpha, a( 1, i+1 ), 1, tau, 1 )
266 CALL
dsyr2( uplo, i, -one, a( 1, i+1 ), 1, tau, 1, a,
271 d( i+1 ) = a( i+1, i+1 )
284 CALL
dlarfg( n-i, a( i+1, i ), a( min( i+2, n ), i ), 1,
288 IF( taui.NE.zero )
THEN
296 CALL
dsymv( uplo, n-i, taui, a( i+1, i+1 ), lda,
297 $ a( i+1, i ), 1, zero, tau( i ), 1 )
301 alpha = -half*taui*
ddot( n-i, tau( i ), 1, a( i+1, i ),
303 CALL
daxpy( n-i, alpha, a( i+1, i ), 1, tau( i ), 1 )
308 CALL
dsyr2( uplo, n-i, -one, a( i+1, i ), 1, tau( i ), 1,
309 $ a( i+1, i+1 ), lda )