150 SUBROUTINE sptt05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
151 $ ferr, berr, reslts )
159 INTEGER ldb, ldx, ldxact, n, nrhs
162 REAL b( ldb, * ), berr( * ), d( * ), e( * ),
163 $ ferr( * ), reslts( * ), x( ldx, * ),
171 parameter( zero = 0.0e+0, one = 1.0e+0 )
174 INTEGER i, imax, j, k, nz
175 REAL axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
183 INTRINSIC abs, max, min
189 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
196 unfl =
slamch(
'Safe minimum' )
206 imax =
isamax( n, x( 1, j ), 1 )
207 xnorm = max( abs( x( imax, j ) ), unfl )
210 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
213 IF( xnorm.GT.one )
THEN
215 ELSE IF( diff.LE.ovfl*xnorm )
THEN
223 IF( diff / xnorm.LE.ferr( j ) )
THEN
224 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
236 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) )
238 axbi = abs( b( 1, k ) ) + abs( d( 1 )*x( 1, k ) ) +
239 $ abs( e( 1 )*x( 2, k ) )
241 tmp = abs( b( i, k ) ) + abs( e( i-1 )*x( i-1, k ) ) +
242 $ abs( d( i )*x( i, k ) ) + abs( e( i )*x( i+1, k ) )
243 axbi = min( axbi, tmp )
245 tmp = abs( b( n, k ) ) + abs( e( n-1 )*x( n-1, k ) ) +
246 $ abs( d( n )*x( n, k ) )
247 axbi = min( axbi, tmp )
249 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
253 reslts( 2 ) = max( reslts( 2 ), tmp )