163 SUBROUTINE dgtt05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
164 $ XACT, LDXACT, FERR, BERR, RESLTS )
172 INTEGER LDB, LDX, LDXACT, N, NRHS
175 DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DL( * ),
176 $ du( * ), ferr( * ), reslts( * ), x( ldx, * ),
183 DOUBLE PRECISION ZERO, ONE
184 parameter( zero = 0.0d+0, one = 1.0d+0 )
188 INTEGER I, IMAX, J, K, NZ
189 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
194 DOUBLE PRECISION DLAMCH
195 EXTERNAL lsame, idamax, dlamch
198 INTRINSIC abs, max, min
204 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
210 eps = dlamch(
'Epsilon' )
211 unfl = dlamch(
'Safe minimum' )
213 notran = lsame( trans,
'N' )
222 imax = idamax( n, x( 1, j ), 1 )
223 xnorm = max( abs( x( imax, j ) ), unfl )
226 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
229 IF( xnorm.GT.one )
THEN
231 ELSE IF( diff.LE.ovfl*xnorm )
THEN
239 IF( diff / xnorm.LE.ferr( j ) )
THEN
240 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
253 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
255 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
256 $ abs( du( 1 )*x( 2, k ) )
258 tmp = abs( b( i, k ) ) + abs( dl( i-1 )*x( i-1, k ) )
259 $ + abs( d( i )*x( i, k ) ) +
260 $ abs( du( i )*x( i+1, k ) )
261 axbi = min( axbi, tmp )
263 tmp = abs( b( n, k ) ) + abs( dl( n-1 )*x( n-1, k ) ) +
264 $ abs( d( n )*x( n, k ) )
265 axbi = min( axbi, tmp )
269 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
271 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
272 $ abs( dl( 1 )*x( 2, k ) )
274 tmp = abs( b( i, k ) ) + abs( du( i-1 )*x( i-1, k ) )
275 $ + abs( d( i )*x( i, k ) ) +
276 $ abs( dl( i )*x( i+1, k ) )
277 axbi = min( axbi, tmp )
279 tmp = abs( b( n, k ) ) + abs( du( n-1 )*x( n-1, k ) ) +
280 $ abs( d( n )*x( n, k ) )
281 axbi = min( axbi, tmp )
284 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
288 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine dgtt05(trans, n, nrhs, dl, d, du, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DGTT05