133 SUBROUTINE zqrt16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
143 INTEGER lda, ldb, ldx, m, n, nrhs
144 DOUBLE PRECISION resid
147 DOUBLE PRECISION rwork( * )
148 COMPLEX*16 a( lda, * ), b( ldb, * ), x( ldx, * )
154 DOUBLE PRECISION zero, one
155 parameter( zero = 0.0d+0, one = 1.0d+0 )
157 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
161 DOUBLE PRECISION anorm, bnorm, eps, xnorm
178 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.EQ.0 )
THEN
183 IF(
lsame( trans,
'T' ) .OR.
lsame( trans,
'C' ) )
THEN
184 anorm =
zlange(
'I', m, n, a, lda, rwork )
188 anorm =
zlange(
'1', m, n, a, lda, rwork )
197 CALL
zgemm( trans,
'No transpose', n1, nrhs, n2, -cone, a, lda, x,
198 $ ldx, cone, b, ldb )
205 bnorm =
dzasum( n1, b( 1, j ), 1 )
206 xnorm =
dzasum( n2, x( 1, j ), 1 )
207 IF( anorm.EQ.zero .AND. bnorm.EQ.zero )
THEN
209 ELSE IF( anorm.LE.zero .OR. xnorm.LE.zero )
THEN
212 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) /
213 $ ( max( m, n )*eps ) )