90 SUBROUTINE dptt01( N, D, E, DF, EF, WORK, RESID )
98 DOUBLE PRECISION RESID
101 DOUBLE PRECISION D( * ), DF( * ), E( * ), EF( * ), WORK( * )
107 DOUBLE PRECISION ONE, ZERO
108 parameter( one = 1.0d+0, zero = 0.0d+0 )
112 DOUBLE PRECISION ANORM, DE, EPS
115 DOUBLE PRECISION DLAMCH
119 INTRINSIC abs, dble, max
130 eps = dlamch(
'Epsilon' )
134 work( 1 ) = df( 1 ) - d( 1 )
137 work( n+i ) = de - e( i )
138 work( 1+i ) = de*ef( i ) + df( i+1 ) - d( i+1 )
145 resid = abs( work( 1 ) )
147 anorm = max( d( 1 )+abs( e( 1 ) ), d( n )+abs( e( n-1 ) ) )
148 resid = max( abs( work( 1 ) )+abs( work( n+1 ) ),
149 $ abs( work( n ) )+abs( work( 2*n-1 ) ) )
151 anorm = max( anorm, d( i )+abs( e( i ) )+abs( e( i-1 ) ) )
152 resid = max( resid, abs( work( i ) )+abs( work( n+i-1 ) )+
153 $ abs( work( n+i ) ) )
159 IF( anorm.LE.zero )
THEN
163 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine dptt01(n, d, e, df, ef, work, resid)
DPTT01