134 SUBROUTINE dgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
135 $ ldwork, rwork, resid )
144 DOUBLE PRECISION RESID
148 DOUBLE PRECISION D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
149 $ du2( * ), duf( * ), rwork( * ),
156 DOUBLE PRECISION ONE, ZERO
157 parameter ( one = 1.0d+0, zero = 0.0d+0 )
160 INTEGER I, IP, J, LASTJ
161 DOUBLE PRECISION ANORM, EPS, LI
164 DOUBLE PRECISION DLAMCH, DLANGT, DLANHS
165 EXTERNAL dlamch, dlangt, dlanhs
182 eps = dlamch(
'Epsilon' )
193 work( i, i ) = df( i )
195 $ work( i, i+1 ) = duf( i )
197 $ work( i, i+2 ) = du2( i )
198 ELSE IF( i.EQ.n )
THEN
199 work( i, i ) = df( i )
201 work( i, i ) = df( i )
202 work( i, i+1 ) = duf( i )
204 $ work( i, i+2 ) = du2( i )
211 DO 40 i = n - 1, 1, -1
213 CALL daxpy( lastj-i+1, li, work( i, i ), ldwork,
214 $ work( i+1, i ), ldwork )
217 lastj = min( i+2, n )
219 CALL dswap( lastj-i+1, work( i, i ), ldwork, work( i+1, i ),
226 work( 1, 1 ) = work( 1, 1 ) - d( 1 )
228 work( 1, 2 ) = work( 1, 2 ) - du( 1 )
229 work( n, n-1 ) = work( n, n-1 ) - dl( n-1 )
230 work( n, n ) = work( n, n ) - d( n )
232 work( i, i-1 ) = work( i, i-1 ) - dl( i-1 )
233 work( i, i ) = work( i, i ) - d( i )
234 work( i, i+1 ) = work( i, i+1 ) - du( i )
240 anorm = dlangt(
'1', n, dl, d, du )
245 resid = dlanhs(
'1', n, work, ldwork, rwork )
249 IF( anorm.LE.zero )
THEN
253 resid = ( resid / anorm ) / eps
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine dswap(N, DX, INCX, DY, INCY)
DSWAP
subroutine dgtt01(N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK, LDWORK, RWORK, RESID)
DGTT01