155 SUBROUTINE cppt05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
156 $ LDXACT, FERR, BERR, RESLTS )
164 INTEGER LDB, LDX, LDXACT, N, NRHS
167 REAL BERR( * ), FERR( * ), RESLTS( * )
168 COMPLEX AP( * ), B( LDB, * ), X( LDX, * ),
176 parameter( zero = 0.0e+0, one = 1.0e+0 )
180 INTEGER I, IMAX, J, JC, K
181 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
188 EXTERNAL lsame, icamax, slamch
191 INTRINSIC abs, aimag, max, min, real
197 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
203 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
209 eps = slamch(
'Epsilon' )
210 unfl = slamch(
'Safe minimum' )
212 upper = lsame( uplo,
'U' )
220 imax = icamax( n, x( 1, j ), 1 )
221 xnorm = max( cabs1( x( imax, j ) ), unfl )
224 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
227 IF( xnorm.GT.one )
THEN
229 ELSE IF( diff.LE.ovfl*xnorm )
THEN
237 IF( diff / xnorm.LE.ferr( j ) )
THEN
238 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
250 tmp = cabs1( b( i, k ) )
252 jc = ( ( i-1 )*i ) / 2
254 tmp = tmp + cabs1( ap( jc+j ) )*cabs1( x( j, k ) )
256 tmp = tmp + abs( real( ap( jc+i ) ) )*cabs1( x( i, k ) )
259 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
265 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
268 tmp = tmp + abs( real( ap( jc ) ) )*cabs1( x( i, k ) )
270 tmp = tmp + cabs1( ap( jc+j-i ) )*cabs1( x( j, k ) )
276 axbi = min( axbi, tmp )
279 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
280 $ max( axbi, ( n+1 )*unfl ) )
284 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine cppt05(uplo, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPPT05