134 SUBROUTINE cgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
135 $ ldwork, rwork, resid )
149 COMPLEX D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
150 $ du2( * ), duf( * ), work( ldwork, * )
157 parameter ( one = 1.0e+0, zero = 0.0e+0 )
160 INTEGER I, IP, J, LASTJ
165 REAL CLANGT, CLANHS, SLAMCH
166 EXTERNAL clangt, clanhs, slamch
183 eps = slamch(
'Epsilon' )
194 work( i, i ) = df( i )
196 $ work( i, i+1 ) = duf( i )
198 $ work( i, i+2 ) = du2( i )
199 ELSE IF( i.EQ.n )
THEN
200 work( i, i ) = df( i )
202 work( i, i ) = df( i )
203 work( i, i+1 ) = duf( i )
205 $ work( i, i+2 ) = du2( i )
212 DO 40 i = n - 1, 1, -1
214 CALL caxpy( lastj-i+1, li, work( i, i ), ldwork,
215 $ work( i+1, i ), ldwork )
218 lastj = min( i+2, n )
220 CALL cswap( lastj-i+1, work( i, i ), ldwork, work( i+1, i ),
227 work( 1, 1 ) = work( 1, 1 ) - d( 1 )
229 work( 1, 2 ) = work( 1, 2 ) - du( 1 )
230 work( n, n-1 ) = work( n, n-1 ) - dl( n-1 )
231 work( n, n ) = work( n, n ) - d( n )
233 work( i, i-1 ) = work( i, i-1 ) - dl( i-1 )
234 work( i, i ) = work( i, i ) - d( i )
235 work( i, i+1 ) = work( i, i+1 ) - du( i )
241 anorm = clangt(
'1', n, dl, d, du )
246 resid = clanhs(
'1', n, work, ldwork, rwork )
250 IF( anorm.LE.zero )
THEN
254 resid = ( resid / anorm ) / eps
subroutine cgtt01(N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK, LDWORK, RWORK, RESID)
CGTT01
subroutine cswap(N, CX, INCX, CY, INCY)
CSWAP
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY