150 SUBROUTINE dptt05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
151 $ ferr, berr, reslts )
159 INTEGER LDB, LDX, LDXACT, N, NRHS
162 DOUBLE PRECISION B( ldb, * ), BERR( * ), D( * ), E( * ),
163 $ ferr( * ), reslts( * ), x( ldx, * ),
170 DOUBLE PRECISION ZERO, ONE
171 parameter ( zero = 0.0d+0, one = 1.0d+0 )
174 INTEGER I, IMAX, J, K, NZ
175 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
179 DOUBLE PRECISION DLAMCH
180 EXTERNAL idamax, dlamch
183 INTRINSIC abs, max, min
189 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
195 eps = dlamch(
'Epsilon' )
196 unfl = dlamch(
'Safe minimum' )
206 imax = idamax( n, x( 1, j ), 1 )
207 xnorm = max( abs( x( imax, j ) ), unfl )
210 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
213 IF( xnorm.GT.one )
THEN
215 ELSE IF( diff.LE.ovfl*xnorm )
THEN
223 IF( diff / xnorm.LE.ferr( j ) )
THEN
224 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
236 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
238 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
239 $ abs( e( 1 )*x( 2, k ) )
241 tmp = abs( b( i, k ) ) + abs( e( i-1 )*x( i-1, k ) ) +
242 $ abs( d( i )*x( i, k ) ) + abs( e( i )*x( i+1, k ) )
243 axbi = min( axbi, tmp )
245 tmp = abs( b( n, k ) ) + abs( e( n-1 )*x( n-1, k ) ) +
246 $ abs( d( n )*x( n, k ) )
247 axbi = min( axbi, tmp )
249 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
253 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine dptt05(N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
DPTT05