132 SUBROUTINE sgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
133 $ LDWORK, RWORK, RESID )
145 REAL D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
146 $ du2( * ), duf( * ), rwork( * ),
154 parameter( one = 1.0e+0, zero = 0.0e+0 )
157 INTEGER I, IP, J, LASTJ
161 REAL SLAMCH, SLANGT, SLANHS
162 EXTERNAL slamch, slangt, slanhs
179 eps = slamch(
'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 saxpy( lastj-i+1, li, work( i, i ), ldwork,
211 $ work( i+1, i ), ldwork )
214 lastj = min( i+2, n )
216 CALL sswap( 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 = slangt(
'1', n, dl, d, du )
242 resid = slanhs(
'1', n, work, ldwork, rwork )
246 IF( anorm.LE.zero )
THEN
250 resid = ( resid / anorm ) / eps
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine sswap(n, sx, incx, sy, incy)
SSWAP
subroutine sgtt01(n, dl, d, du, dlf, df, duf, du2, ipiv, work, ldwork, rwork, resid)
SGTT01