153 SUBROUTINE dlagtf( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
161 DOUBLE PRECISION LAMBDA, TOL
165 DOUBLE PRECISION A( * ), B( * ), C( * ), D( * )
171 DOUBLE PRECISION ZERO
172 parameter( zero = 0.0d+0 )
176 DOUBLE PRECISION EPS, MULT, PIV1, PIV2, SCALE1, SCALE2, TEMP, TL
182 DOUBLE PRECISION DLAMCH
193 CALL xerbla(
'DLAGTF', -info )
200 a( 1 ) = a( 1 ) - lambda
208 eps = dlamch(
'Epsilon' )
211 scale1 = abs( a( 1 ) ) + abs( b( 1 ) )
213 a( k+1 ) = a( k+1 ) - lambda
214 scale2 = abs( c( k ) ) + abs( a( k+1 ) )
216 $ scale2 = scale2 + abs( b( k+1 ) )
217 IF( a( k ).EQ.zero )
THEN
220 piv1 = abs( a( k ) ) / scale1
222 IF( c( k ).EQ.zero )
THEN
229 piv2 = abs( c( k ) ) / scale2
230 IF( piv2.LE.piv1 )
THEN
233 c( k ) = c( k ) / a( k )
234 a( k+1 ) = a( k+1 ) - c( k )*b( k )
239 mult = a( k ) / c( k )
242 a( k+1 ) = b( k ) - mult*temp
243 IF( k.LT.( n-1 ) )
THEN
245 b( k+1 ) = -mult*d( k )
251 IF( ( max( piv1, piv2 ).LE.tl ) .AND. ( in( n ).EQ.0 ) )
254 IF( ( abs( a( n ) ).LE.scale1*tl ) .AND. ( in( n ).EQ.0 ) )
subroutine dlagtf(n, a, lambda, b, c, tol, d, in, info)
DLAGTF computes an LU factorization of a matrix T-λI, where T is a general tridiagonal matrix,...