175 SUBROUTINE ztpt05( 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 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
189 COMPLEX*16 AP( * ), B( ldb, * ), X( ldx, * ),
196 DOUBLE PRECISION ZERO, ONE
197 parameter ( zero = 0.0d+0, one = 1.0d+0 )
200 LOGICAL NOTRAN, UNIT, UPPER
201 INTEGER I, IFU, IMAX, J, JC, K
202 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
208 DOUBLE PRECISION DLAMCH
209 EXTERNAL lsame, izamax, dlamch
212 INTRINSIC abs, dble, dimag, max, min
215 DOUBLE PRECISION CABS1
218 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
224 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
230 eps = dlamch(
'Epsilon' )
231 unfl = dlamch(
'Safe minimum' )
233 upper = lsame( uplo,
'U' )
234 notran = lsame( trans,
'N' )
235 unit = lsame( diag,
'U' )
243 imax = izamax( 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 ztpt05(UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZTPT05