101 SUBROUTINE zget04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
108 INTEGER LDX, LDXACT, N, NRHS
109 DOUBLE PRECISION RCOND, RESID
112 COMPLEX*16 X( LDX, * ), XACT( LDXACT, * )
118 DOUBLE PRECISION ZERO
119 parameter( zero = 0.0d+0 )
123 DOUBLE PRECISION DIFFNM, EPS, XNORM
128 DOUBLE PRECISION DLAMCH
129 EXTERNAL izamax, dlamch
132 INTRINSIC abs, dble, dimag, max
135 DOUBLE PRECISION CABS1
138 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
144 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
151 eps = dlamch(
'Epsilon' )
152 IF( rcond.LT.zero )
THEN
163 ix = izamax( n, xact( 1, j ), 1 )
164 xnorm = cabs1( xact( ix, j ) )
167 diffnm = max( diffnm, cabs1( x( i, j )-xact( i, j ) ) )
169 IF( xnorm.LE.zero )
THEN
171 $ resid = 1.0d0 / eps
173 resid = max( resid, ( diffnm / xnorm )*rcond )
176 IF( resid*eps.LT.1.0d0 )
177 $ resid = resid / eps
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04