148 SUBROUTINE dptt05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
149 $ FERR, BERR, RESLTS )
156 INTEGER LDB, LDX, LDXACT, N, NRHS
159 DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), E( * ),
160 $ ferr( * ), reslts( * ), x( ldx, * ),
167 DOUBLE PRECISION ZERO, ONE
168 parameter( zero = 0.0d+0, one = 1.0d+0 )
171 INTEGER I, IMAX, J, K, NZ
172 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
176 DOUBLE PRECISION DLAMCH
177 EXTERNAL idamax, dlamch
180 INTRINSIC abs, max, min
186 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
192 eps = dlamch(
'Epsilon' )
193 unfl = dlamch(
'Safe minimum' )
203 imax = idamax( n, x( 1, j ), 1 )
204 xnorm = max( abs( x( imax, j ) ), unfl )
207 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
210 IF( xnorm.GT.one )
THEN
212 ELSE IF( diff.LE.ovfl*xnorm )
THEN
220 IF( diff / xnorm.LE.ferr( j ) )
THEN
221 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
233 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
235 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
236 $ abs( e( 1 )*x( 2, k ) )
238 tmp = abs( b( i, k ) ) + abs( e( i-1 )*x( i-1, k ) ) +
239 $ abs( d( i )*x( i, k ) ) + abs( e( i )*x( i+1, k ) )
240 axbi = min( axbi, tmp )
242 tmp = abs( b( n, k ) ) + abs( e( n-1 )*x( n-1, k ) ) +
243 $ abs( d( n )*x( n, k ) )
244 axbi = min( axbi, tmp )
246 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
250 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine dptt05(n, nrhs, d, e, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DPTT05