132 SUBROUTINE cgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
133 $ LDWORK, RWORK, RESID )
146 COMPLEX D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
147 $ du2( * ), duf( * ), work( ldwork, * )
154 parameter( one = 1.0e+0, zero = 0.0e+0 )
157 INTEGER I, IP, J, LASTJ
162 REAL CLANGT, CLANHS, SLAMCH
163 EXTERNAL clangt, clanhs, slamch
180 eps = slamch(
'Epsilon' )
191 work( i, i ) = df( i )
193 $ work( i, i+1 ) = duf( i )
195 $ work( i, i+2 ) = du2( i )
196 ELSE IF( i.EQ.n )
THEN
197 work( i, i ) = df( i )
199 work( i, i ) = df( i )
200 work( i, i+1 ) = duf( i )
202 $ work( i, i+2 ) = du2( i )
209 DO 40 i = n - 1, 1, -1
211 CALL caxpy( lastj-i+1, li, work( i, i ), ldwork,
212 $ work( i+1, i ), ldwork )
215 lastj = min( i+2, n )
217 CALL cswap( lastj-i+1, work( i, i ), ldwork, work( i+1, i ),
224 work( 1, 1 ) = work( 1, 1 ) - d( 1 )
226 work( 1, 2 ) = work( 1, 2 ) - du( 1 )
227 work( n, n-1 ) = work( n, n-1 ) - dl( n-1 )
228 work( n, n ) = work( n, n ) - d( n )
230 work( i, i-1 ) = work( i, i-1 ) - dl( i-1 )
231 work( i, i ) = work( i, i ) - d( i )
232 work( i, i+1 ) = work( i, i+1 ) - du( i )
238 anorm = clangt(
'1', n, dl, d, du )
243 resid = clanhs(
'1', n, work, ldwork, rwork )
247 IF( anorm.LE.zero )
THEN
251 resid = ( resid / anorm ) / eps
subroutine cgtt01(n, dl, d, du, dlf, df, duf, du2, ipiv, work, ldwork, rwork, resid)
CGTT01
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
subroutine cswap(n, cx, incx, cy, incy)
CSWAP