173 SUBROUTINE ztpt05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
174 $ XACT, LDXACT, FERR, BERR, RESLTS )
181 CHARACTER DIAG, TRANS, UPLO
182 INTEGER LDB, LDX, LDXACT, N, NRHS
185 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
186 COMPLEX*16 AP( * ), B( LDB, * ), X( LDX, * ),
193 DOUBLE PRECISION ZERO, ONE
194 parameter( zero = 0.0d+0, one = 1.0d+0 )
197 LOGICAL NOTRAN, UNIT, UPPER
198 INTEGER I, IFU, IMAX, J, JC, K
199 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
205 DOUBLE PRECISION DLAMCH
206 EXTERNAL lsame, izamax, dlamch
209 INTRINSIC abs, dble, dimag, max, min
212 DOUBLE PRECISION CABS1
215 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
221 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
227 eps = dlamch(
'Epsilon' )
228 unfl = dlamch(
'Safe minimum' )
230 upper = lsame( uplo,
'U' )
231 notran = lsame( trans,
'N' )
232 unit = lsame( diag,
'U' )
240 imax = izamax( n, x( 1, j ), 1 )
241 xnorm = max( cabs1( x( imax, j ) ), unfl )
244 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
247 IF( xnorm.GT.one )
THEN
249 ELSE IF( diff.LE.ovfl*xnorm )
THEN
257 IF( diff / xnorm.LE.ferr( j ) )
THEN
258 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
273 tmp = cabs1( b( i, k ) )
275 jc = ( ( i-1 )*i ) / 2
276 IF( .NOT.notran )
THEN
278 tmp = tmp + cabs1( ap( jc+j ) )*cabs1( x( j, k ) )
281 $ tmp = tmp + cabs1( x( i, k ) )
285 tmp = tmp + cabs1( x( i, k ) )
289 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
297 tmp = tmp + cabs1( ap( jc ) )*cabs1( x( j, k ) )
301 $ tmp = tmp + cabs1( x( i, k ) )
303 jc = ( i-1 )*( n-i ) + ( i*( i+1 ) ) / 2
305 $ tmp = tmp + cabs1( x( i, k ) )
307 tmp = tmp + cabs1( ap( jc+j-i ) )*
315 axbi = min( axbi, tmp )
318 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
319 $ max( axbi, ( n+1 )*unfl ) )
323 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine ztpt05(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZTPT05