132 SUBROUTINE dgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
133 $ LDWORK, RWORK, RESID )
141 DOUBLE PRECISION RESID
145 DOUBLE PRECISION D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
146 $ du2( * ), duf( * ), rwork( * ),
153 DOUBLE PRECISION ONE, ZERO
154 parameter( one = 1.0d+0, zero = 0.0d+0 )
157 INTEGER I, IP, J, LASTJ
158 DOUBLE PRECISION ANORM, EPS, LI
161 DOUBLE PRECISION DLAMCH, DLANGT, DLANHS
162 EXTERNAL dlamch, dlangt, dlanhs
179 eps = dlamch(
'Epsilon' )
190 work( i, i ) = df( i )
192 $ work( i, i+1 ) = duf( i )
194 $ work( i, i+2 ) = du2( i )
195 ELSE IF( i.EQ.n )
THEN
196 work( i, i ) = df( i )
198 work( i, i ) = df( i )
199 work( i, i+1 ) = duf( i )
201 $ work( i, i+2 ) = du2( i )
208 DO 40 i = n - 1, 1, -1
210 CALL daxpy( lastj-i+1, li, work( i, i ), ldwork,
211 $ work( i+1, i ), ldwork )
214 lastj = min( i+2, n )
216 CALL dswap( lastj-i+1, work( i, i ), ldwork, work( i+1, i ),
223 work( 1, 1 ) = work( 1, 1 ) - d( 1 )
225 work( 1, 2 ) = work( 1, 2 ) - du( 1 )
226 work( n, n-1 ) = work( n, n-1 ) - dl( n-1 )
227 work( n, n ) = work( n, n ) - d( n )
229 work( i, i-1 ) = work( i, i-1 ) - dl( i-1 )
230 work( i, i ) = work( i, i ) - d( i )
231 work( i, i+1 ) = work( i, i+1 ) - du( i )
237 anorm = dlangt(
'1', n, dl, d, du )
242 resid = dlanhs(
'1', n, work, ldwork, rwork )
246 IF( anorm.LE.zero )
THEN
250 resid = ( resid / anorm ) / eps
subroutine dgtt01(n, dl, d, du, dlf, df, duf, du2, ipiv, work, ldwork, rwork, resid)
DGTT01
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dswap(n, dx, incx, dy, incy)
DSWAP