1 SUBROUTINE dsterf( N, D, E, INFO )
12 DOUBLE PRECISION D( * ), E( * )
46 DOUBLE PRECISION ZERO, ONE, TWO, THREE
47 parameter( zero = 0.0d0, one = 1.0d0, two = 2.0d0,
50 parameter( maxit = 30 )
53 INTEGER I, ISCALE, JTOT, L, L1, LEND, LENDSV, LSV, M,
55 DOUBLE PRECISION ALPHA, ANORM, BB, C, EPS, EPS2, GAMMA, OLDC,
56 $ OLDGAM, P, R, RT1, RT2, RTE, S, SAFMAX, SAFMIN,
57 $ SIGMA, SSFMAX, SSFMIN
60 DOUBLE PRECISION DLAMCH, DLANST, DLAPY2
61 EXTERNAL dlamch, dlanst, dlapy2
67 INTRINSIC abs, sign, sqrt
79 CALL xerbla(
'DSTERF', -info )
89 safmin = dlamch(
'S' )
91 ssfmax = sqrt( safmax ) / three
92 ssfmin = sqrt( safmin ) / eps2
112 IF( abs( e( m ) ).LE.( sqrt( abs( d( m ) ) )*sqrt( abs( d( m+
113 $ 1 ) ) ) )*eps )
THEN
131 anorm = dlanst(
'I', lend-l+1, d( l ), e( l ) )
133 IF( anorm.GT.ssfmax )
THEN
135 CALL dlascl(
'G', 0, 0, anorm, ssfmax, lend-l+1, 1, d( l ), n,
137 CALL dlascl(
'G', 0, 0, anorm, ssfmax, lend-l, 1, e( l ), n,
139 ELSE IF( anorm.LT.ssfmin )
THEN
141 CALL dlascl(
'G', 0, 0, anorm, ssfmin, lend-l+1, 1, d( l ), n,
143 CALL dlascl(
'G', 0, 0, anorm, ssfmin, lend-l, 1, e( l ), n,
147 DO 40 i = l, lend - 1
153 IF( abs( d( lend ) ).LT.abs( d( l ) ) )
THEN
166 DO 60 m = l, lend - 1
167 IF( abs( e( m ) ).LE.eps2*abs( d( m )*d( m+1 ) ) )
185 CALL dlae2( d( l ), rte, d( l+1 ), rt1, rt2 )
202 sigma = ( d( l+1 )-p ) / ( two*rte )
203 r = dlapy2( sigma, one )
204 sigma = p - ( rte / ( sigma+sign( r, sigma ) ) )
208 gamma = d( m ) - sigma
213 DO 80 i = m - 1, l, -1
223 gamma = c*( alpha-sigma ) - s*oldgam
224 d( i+1 ) = oldgam + ( alpha-gamma )
226 p = ( gamma*gamma ) / c
233 d( l ) = sigma + gamma
253 DO 110 m = l, lend + 1, -1
254 IF( abs( e( m-1 ) ).LE.eps2*abs( d( m )*d( m-1 ) ) )
270 rte = sqrt( e( l-1 ) )
271 CALL dlae2( d( l ), rte, d( l-1 ), rt1, rt2 )
287 rte = sqrt( e( l-1 ) )
288 sigma = ( d( l-1 )-p ) / ( two*rte )
289 r = dlapy2( sigma, one )
290 sigma = p - ( rte / ( sigma+sign( r, sigma ) ) )
294 gamma = d( m ) - sigma
309 gamma = c*( alpha-sigma ) - s*oldgam
310 d( i ) = oldgam + ( alpha-gamma )
312 p = ( gamma*gamma ) / c
319 d( l ) = sigma + gamma
338 $
CALL dlascl(
'G', 0, 0, ssfmax, anorm, lendsv-lsv+1, 1,
339 $ d( lsv ), n, info )
341 $
CALL dlascl(
'G', 0, 0, ssfmin, anorm, lendsv-lsv+1, 1,
342 $ d( lsv ), n, info )
358 CALL dlasrt(
'I', n, d, info )
subroutine dlae2(A, B, C, RT1, RT2)
subroutine dlascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
subroutine dlasrt(ID, N, D, INFO)
subroutine dsterf(N, D, E, INFO)
subroutine xerbla(SRNAME, INFO)