155 SUBROUTINE slagtf( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
167 REAL A( * ), B( * ), C( * ), D( * )
174 parameter( zero = 0.0e+0 )
178 REAL EPS, MULT, PIV1, PIV2, SCALE1, SCALE2, TEMP, TL
195 CALL xerbla(
'SLAGTF', -info )
202 a( 1 ) = a( 1 ) - lambda
210 eps = slamch(
'Epsilon' )
213 scale1 = abs( a( 1 ) ) + abs( b( 1 ) )
215 a( k+1 ) = a( k+1 ) - lambda
216 scale2 = abs( c( k ) ) + abs( a( k+1 ) )
218 $ scale2 = scale2 + abs( b( k+1 ) )
219 IF( a( k ).EQ.zero )
THEN
222 piv1 = abs( a( k ) ) / scale1
224 IF( c( k ).EQ.zero )
THEN
231 piv2 = abs( c( k ) ) / scale2
232 IF( piv2.LE.piv1 )
THEN
235 c( k ) = c( k ) / a( k )
236 a( k+1 ) = a( k+1 ) - c( k )*b( k )
241 mult = a( k ) / c( k )
244 a( k+1 ) = b( k ) - mult*temp
245 IF( k.LT.( n-1 ) )
THEN
247 b( k+1 ) = -mult*d( k )
253 IF( ( max( piv1, piv2 ).LE.tl ) .AND. ( in( n ).EQ.0 ) )
256 IF( ( abs( a( n ) ).LE.scale1*tl ) .AND. ( in( n ).EQ.0 ) )
subroutine xerbla(srname, info)
subroutine slagtf(n, a, lambda, b, c, tol, d, in, info)
SLAGTF computes an LU factorization of a matrix T-λI, where T is a general tridiagonal matrix,...