1 SUBROUTINE cppt05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
2 $ ldxact, ferr, berr, reslts )
10 INTEGER ldb, ldx, ldxact, n, nrhs
13 REAL berr( * ), ferr( * ), reslts( * )
14 COMPLEX ap( * ), b( ldb, * ), x( ldx, * ),
99 parameter( zero = 0.0e+0, one = 1.0e+0 )
103 INTEGER i, imax, j, jc, k
104 REAL axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
111 EXTERNAL lsame, icamax, slamch
114 INTRINSIC abs, aimag,
max,
min, real
120 cabs1( zdum ) = abs(
REAL( ZDUM ) ) + abs( aimag( zdum ) )
126 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
132 eps = slamch(
'Epsilon' )
133 unfl = slamch(
'Safe minimum' )
135 upper = lsame(
uplo,
'U' )
143 imax = icamax( n, x( 1, j ), 1 )
144 xnorm =
max( cabs1( x( imax, j ) ), unfl )
147 diff =
max( diff, cabs1( x( i, j )-xact( i, j ) ) )
150 IF( xnorm.GT.one )
THEN
152 ELSE IF( diff.LE.ovfl*xnorm )
THEN
160 IF( diff / xnorm.LE.ferr( j ) )
THEN
161 errbnd =
max( errbnd, ( diff / xnorm ) / ferr( j ) )
173 tmp = cabs1( b( i, k ) )
175 jc = ( ( i-1 )*i ) / 2
177 tmp = tmp + cabs1( ap( jc+j ) )*cabs1( x( j, k ) )
179 tmp = tmp + abs(
REAL( AP( JC+I ) ) )*cabs1( x( i, k ) )
182 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
188 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
191 tmp = tmp + abs(
REAL( AP( JC ) ) )*cabs1( x( i, k ) )
193 tmp = tmp + cabs1( ap( jc+j-i ) )*cabs1( x( j, k ) )
199 axbi =
min( axbi, tmp )
202 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
203 $
max( axbi, ( n+1 )*unfl ) )
207 reslts( 2 ) =
max( reslts( 2 ), tmp )