132 SUBROUTINE zgtt01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
133 $ LDWORK, RWORK, RESID )
141 DOUBLE PRECISION RESID
145 DOUBLE PRECISION RWORK( * )
146 COMPLEX*16 D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
147 $ du2( * ), duf( * ), work( ldwork, * )
153 DOUBLE PRECISION ONE, ZERO
154 parameter( one = 1.0d+0, zero = 0.0d+0 )
157 INTEGER I, IP, J, LASTJ
158 DOUBLE PRECISION ANORM, EPS
162 DOUBLE PRECISION DLAMCH, ZLANGT, ZLANHS
163 EXTERNAL dlamch, zlangt, zlanhs
180 eps = dlamch(
'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 zaxpy( lastj-i+1, li, work( i, i ), ldwork,
212 $ work( i+1, i ), ldwork )
215 lastj = min( i+2, n )
217 CALL zswap( 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 = zlangt(
'1', n, dl, d, du )
243 resid = zlanhs(
'1', n, work, ldwork, rwork )
247 IF( anorm.LE.zero )
THEN
251 resid = ( resid / anorm ) / eps
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine zgtt01(n, dl, d, du, dlf, df, duf, du2, ipiv, work, ldwork, rwork, resid)
ZGTT01