148 SUBROUTINE cptt05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
149 $ FERR, BERR, RESLTS )
156 INTEGER LDB, LDX, LDXACT, N, NRHS
159 REAL BERR( * ), D( * ), FERR( * ), RESLTS( * )
160 COMPLEX B( LDB, * ), E( * ), 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
178 EXTERNAL icamax, slamch
181 INTRINSIC abs, aimag, max, min, real
187 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
193 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
199 eps = slamch(
'Epsilon' )
200 unfl = slamch(
'Safe minimum' )
210 imax = icamax( n, x( 1, j ), 1 )
211 xnorm = max( cabs1( x( imax, j ) ), unfl )
214 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
217 IF( xnorm.GT.one )
THEN
219 ELSE IF( diff.LE.ovfl*xnorm )
THEN
227 IF( diff / xnorm.LE.ferr( j ) )
THEN
228 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
240 axbi = cabs1( b( 1, k ) ) + cabs1( d( 1 )*x( 1, k ) )
242 axbi = cabs1( b( 1, k ) ) + cabs1( d( 1 )*x( 1, k ) ) +
243 $ cabs1( e( 1 ) )*cabs1( x( 2, k ) )
245 tmp = cabs1( b( i, k ) ) + cabs1( e( i-1 ) )*
246 $ cabs1( x( i-1, k ) ) + cabs1( d( i )*x( i, k ) ) +
247 $ cabs1( e( i ) )*cabs1( x( i+1, k ) )
248 axbi = min( axbi, tmp )
250 tmp = cabs1( b( n, k ) ) + cabs1( e( n-1 ) )*
251 $ cabs1( x( n-1, k ) ) + cabs1( d( n )*x( n, k ) )
252 axbi = min( axbi, tmp )
254 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
258 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine cptt05(n, nrhs, d, e, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPTT05