93 SUBROUTINE zptt01( N, D, E, DF, EF, WORK, RESID )
102 DOUBLE PRECISION resid
105 DOUBLE PRECISION d( * ), df( * )
106 COMPLEX*16 e( * ), ef( * ), work( * )
112 DOUBLE PRECISION one, zero
113 parameter( one = 1.0d+0, zero = 0.0d+0 )
117 DOUBLE PRECISION anorm, eps
125 INTRINSIC abs, dble, dconjg, max
140 work( 1 ) = df( 1 ) - d( 1 )
143 work( n+i ) = de - e( i )
144 work( 1+i ) = de*dconjg( ef( i ) ) + df( i+1 ) - d( i+1 )
151 resid = abs( work( 1 ) )
153 anorm = max( d( 1 )+abs( e( 1 ) ), d( n )+abs( e( n-1 ) ) )
154 resid = max( abs( work( 1 ) )+abs( work( n+1 ) ),
155 $ abs( work( n ) )+abs( work( 2*n-1 ) ) )
157 anorm = max( anorm, d( i )+abs( e( i ) )+abs( e( i-1 ) ) )
158 resid = max( resid, abs( work( i ) )+abs( work( n+i-1 ) )+
159 $ abs( work( n+i ) ) )
165 IF( anorm.LE.zero )
THEN
169 resid = ( ( resid / dble( n ) ) / anorm ) / eps