165 SUBROUTINE sgtt05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
166 $ xact, ldxact, ferr, berr, reslts )
175 INTEGER ldb, ldx, ldxact, n, nrhs
178 REAL b( ldb, * ), berr( * ), d( * ), dl( * ),
179 $ du( * ), ferr( * ), reslts( * ), x( ldx, * ),
187 parameter( zero = 0.0e+0, one = 1.0e+0 )
191 INTEGER i, imax, j, k, nz
192 REAL axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
201 INTRINSIC abs, max, min
207 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
214 unfl =
slamch(
'Safe minimum' )
216 notran =
lsame( trans,
'N' )
225 imax =
isamax( 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 )