165 SUBROUTINE dgtt05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
166 $ xact, ldxact, ferr, berr, reslts )
175 INTEGER LDB, LDX, LDXACT, N, NRHS
178 DOUBLE PRECISION B( ldb, * ), BERR( * ), D( * ), DL( * ),
179 $ du( * ), ferr( * ), reslts( * ), x( ldx, * ),
186 DOUBLE PRECISION ZERO, ONE
187 parameter ( zero = 0.0d+0, one = 1.0d+0 )
191 INTEGER I, IMAX, J, K, NZ
192 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
197 DOUBLE PRECISION DLAMCH
198 EXTERNAL lsame, idamax, dlamch
201 INTRINSIC abs, max, min
207 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
213 eps = dlamch(
'Epsilon' )
214 unfl = dlamch(
'Safe minimum' )
216 notran = lsame( trans,
'N' )
225 imax = idamax( n, x( 1, j ), 1 )
226 xnorm = max( abs( x( imax, j ) ), unfl )
229 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
232 IF( xnorm.GT.one )
THEN
234 ELSE IF( diff.LE.ovfl*xnorm )
THEN
242 IF( diff / xnorm.LE.ferr( j ) )
THEN
243 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
256 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
258 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
259 $ abs( du( 1 )*x( 2, k ) )
261 tmp = abs( b( i, k ) ) + abs( dl( i-1 )*x( i-1, k ) )
262 $ + abs( d( i )*x( i, k ) ) +
263 $ abs( du( i )*x( i+1, k ) )
264 axbi = min( axbi, tmp )
266 tmp = abs( b( n, k ) ) + abs( dl( n-1 )*x( n-1, k ) ) +
267 $ abs( d( n )*x( n, k ) )
268 axbi = min( axbi, tmp )
272 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
274 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
275 $ abs( dl( 1 )*x( 2, k ) )
277 tmp = abs( b( i, k ) ) + abs( du( i-1 )*x( i-1, k ) )
278 $ + abs( d( i )*x( i, k ) ) +
279 $ abs( dl( i )*x( i+1, k ) )
280 axbi = min( axbi, tmp )
282 tmp = abs( b( n, k ) ) + abs( du( n-1 )*x( n-1, k ) ) +
283 $ abs( d( n )*x( n, k ) )
284 axbi = min( axbi, tmp )
287 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
291 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine dgtt05(TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
DGTT05