102 parameter( zero = 0.0e0, one = 1.0e0, two = 2.0e0,
105 parameter( maxit = 30 )
108 INTEGER I, , JTOT, L, L1, LEND, LENDSV, LSV, M,
110 REAL ALPHA, ANORM, BB, C, EPS, EPS2, GAMMA, OLDC,
111 $ , S, SAFMAX, SAFMIN,
112 $ SIGMA, SSFMAX, SSFMIN
134 CALL xerbla(
'SSTERF', -info )
145 safmax = one / safmin
146 ssfmax = sqrt( safmax ) / three
147 ssfmin = sqrt( safmin ) / eps2
167 IF( abs( e( m ) ).LE.( sqrt( abs( d( m ) ) )*
168 $ sqrt( abs( d( m+1 ) ) ) )*eps )
THEN
186 anorm =
slanst(
'M', lend-l+1, d( l ), e( l ) )
190 IF( anorm.GT.ssfmax )
THEN
192 CALL slascl(
'G', 0, 0, anorm, ssfmax, lend-l+1, 1, d( l ), n,
194 CALL slascl(
'G', 0, 0, anorm, ssfmax, lend-l, 1, e( l ), n,
196 ELSE IF( anorm.LT.ssfmin )
THEN
198 CALL slascl(
'G', 0, 0, anorm, ssfmin, lend-l+1, 1, d( l ), n,
200 CALL slascl( 'g
', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N,
204 DO 40 I = L, LEND - 1
210.LT.
IF( ABS( D( LEND ) )ABS( D( L ) ) ) THEN
223 DO 60 M = L, LEND - 1
224.LE.
IF( ABS( E( M ) )EPS2*ABS( D( M )*D( M+1 ) ) )
242 CALL SLAE2( D( L ), RTE, D( L+1 ), RT1, RT2 )
259 SIGMA = ( D( L+1 )-P ) / ( TWO*RTE )
260 R = SLAPY2( SIGMA, ONE )
261 SIGMA = P - ( RTE / ( SIGMA+SIGN( R, SIGMA ) ) )
265 GAMMA = D( M ) - SIGMA
270 DO 80 I = M - 1, L, -1
280 GAMMA = C*( ALPHA-SIGMA ) - S*OLDGAM
281 D( I+1 ) = OLDGAM + ( ALPHA-GAMMA )
283 P = ( GAMMA*GAMMA ) / C
290 D( L ) = SIGMA + GAMMA
310 DO 110 M = L, LEND + 1, -1
311.LE.
IF( ABS( E( M-1 ) )EPS2*ABS( D( M )*D( M-1 ) ) )
327 RTE = SQRT( E( L-1 ) )
328 CALL SLAE2( D( L ), RTE, D( L-1 ), RT1, RT2 )
344 RTE = SQRT( E( L-1 ) )
345 SIGMA = ( D( L-1 )-P ) / ( TWO*RTE )
346 R = SLAPY2( SIGMA, ONE )
347 SIGMA = P - ( RTE / ( SIGMA+SIGN( R, SIGMA ) ) )
351 GAMMA = D( M ) - SIGMA
366 GAMMA = C*( ALPHA-SIGMA ) - S*OLDGAM
367 D( I ) = OLDGAM + ( ALPHA-GAMMA )
369 P = ( GAMMA*GAMMA ) / C
376 D( L ) = SIGMA + GAMMA
395 $ CALL SLASCL( 'g
', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1,
396 $ D( LSV ), N, INFO )
398 $ CALL SLASCL( 'g
', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1,
399 $ D( LSV ), N, INFO )
415 CALL SLASRT( 'i
', N, D, INFO )
subroutine slae2(a, b, c, rt1, rt2)
SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix.
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.
real function slanst(norm, n, d, e)
SLANST returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine slasrt(id, n, d, info)
SLASRT sorts numbers in increasing or decreasing order.