157 SUBROUTINE cppt05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
158 $ ldxact, ferr, berr, reslts )
167 INTEGER ldb, ldx, ldxact, n, nrhs
170 REAL berr( * ), ferr( * ), reslts( * )
171 COMPLEX ap( * ), b( ldb, * ), x( ldx, * ),
179 parameter( zero = 0.0e+0, one = 1.0e+0 )
183 INTEGER i, imax, j, jc, k
184 REAL axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
194 INTRINSIC abs, aimag, max, min, real
200 cabs1( zdum ) = abs(
REAL( ZDUM ) ) + abs( aimag( zdum ) )
206 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
213 unfl =
slamch(
'Safe minimum' )
215 upper =
lsame( uplo,
'U' )
223 imax =
icamax( n, x( 1, j ), 1 )
224 xnorm = max( cabs1( x( imax, j ) ), unfl )
227 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
230 IF( xnorm.GT.one )
THEN
232 ELSE IF( diff.LE.ovfl*xnorm )
THEN
240 IF( diff / xnorm.LE.ferr( j ) )
THEN
241 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
253 tmp = cabs1( b( i, k ) )
255 jc = ( ( i-1 )*i ) / 2
257 tmp = tmp + cabs1( ap( jc+j ) )*cabs1( x( j, k ) )
259 tmp = tmp + abs(
REAL( AP( JC+I ) ) )*cabs1( x( i, k ) )
262 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
268 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
271 tmp = tmp + abs(
REAL( AP( JC ) ) )*cabs1( x( i, k ) )
273 tmp = tmp + cabs1( ap( jc+j-i ) )*cabs1( x( j, k ) )
279 axbi = min( axbi, tmp )
282 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
283 $ max( axbi, ( n+1 )*unfl ) )
287 reslts( 2 ) = max( reslts( 2 ), tmp )