175 SUBROUTINE ctpt05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
176 $ xact, ldxact, ferr, berr, reslts )
184 CHARACTER DIAG, TRANS, UPLO
185 INTEGER LDB, LDX, LDXACT, N, NRHS
188 REAL BERR( * ), FERR( * ), RESLTS( * )
189 COMPLEX AP( * ), B( ldb, * ), X( ldx, * ),
197 parameter ( zero = 0.0e+0, one = 1.0e+0 )
200 LOGICAL NOTRAN, UNIT, UPPER
201 INTEGER I, IFU, IMAX, J, JC, K
202 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
209 EXTERNAL lsame, icamax, slamch
212 INTRINSIC abs, aimag, max, min, real
218 cabs1( zdum ) = abs(
REAL( ZDUM ) ) + abs( AIMAG( zdum ) )
224 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
230 eps = slamch(
'Epsilon' )
231 unfl = slamch(
'Safe minimum' )
233 upper = lsame( uplo,
'U' )
234 notran = lsame( trans,
'N' )
235 unit = lsame( diag,
'U' )
243 imax = icamax( n, x( 1, j ), 1 )
244 xnorm = max( cabs1( x( imax, j ) ), unfl )
247 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
250 IF( xnorm.GT.one )
THEN
252 ELSE IF( diff.LE.ovfl*xnorm )
THEN
260 IF( diff / xnorm.LE.ferr( j ) )
THEN
261 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
276 tmp = cabs1( b( i, k ) )
278 jc = ( ( i-1 )*i ) / 2
279 IF( .NOT.notran )
THEN
281 tmp = tmp + cabs1( ap( jc+j ) )*cabs1( x( j, k ) )
284 $ tmp = tmp + cabs1( x( i, k ) )
288 tmp = tmp + cabs1( x( i, k ) )
292 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
300 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
304 $ tmp = tmp + cabs1( x( i, k ) )
306 jc = ( i-1 )*( n-i ) + ( i*( i+1 ) ) / 2
308 $ tmp = tmp + cabs1( x( i, k ) )
310 tmp = tmp + cabs1( ap( jc+j-i ) )*
318 axbi = min( axbi, tmp )
321 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
322 $ max( axbi, ( n+1 )*unfl ) )
326 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine ctpt05(UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
CTPT05