148 SUBROUTINE sptt05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
149 $ FERR, BERR, RESLTS )
156 INTEGER LDB, LDX, LDXACT, N, NRHS
159 REAL B( LDB, * ), BERR( * ), D( * ), E( * ),
160 $ ferr( * ), reslts( * ), x( ldx, * ),
168 parameter( zero = 0.0e+0, one = 1.0e+0 )
171 INTEGER I, IMAX, J, K, NZ
172 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
177 EXTERNAL isamax, slamch
180 INTRINSIC abs, max, min
186 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
192 eps = slamch(
'Epsilon' )
193 unfl = slamch(
'Safe minimum' )
203 imax = isamax( 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 sptt05(n, nrhs, d, e, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
SPTT05