134 SUBROUTINE zgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
135 $ ldwork, rwork, resid )
144 DOUBLE PRECISION RESID
148 DOUBLE PRECISION RWORK( * )
149 COMPLEX*16 D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
150 $ du2( * ), duf( * ), work( ldwork, * )
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
165 DOUBLE PRECISION DLAMCH, ZLANGT, ZLANHS
166 EXTERNAL dlamch, zlangt, zlanhs
183 eps = dlamch(
'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 zaxpy( lastj-i+1, li, work( i, i ), ldwork,
215 $ work( i+1, i ), ldwork )
218 lastj = min( i+2, n )
220 CALL zswap( 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 = zlangt(
'1', n, dl, d, du )
246 resid = zlanhs(
'1', n, work, ldwork, rwork )
250 IF( anorm.LE.zero )
THEN
254 resid = ( resid / anorm ) / eps
subroutine zswap(N, ZX, INCX, ZY, INCY)
ZSWAP
subroutine zgtt01(N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK, LDWORK, RWORK, RESID)
ZGTT01
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY