131 SUBROUTINE zqrt16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
140 INTEGER LDA, LDB, LDX, M, N, NRHS
141 DOUBLE PRECISION RESID
144 DOUBLE PRECISION RWORK( * )
145 COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
151 DOUBLE PRECISION ZERO, ONE
152 parameter( zero = 0.0d+0, one = 1.0d+0 )
154 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
158 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
162 DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
163 EXTERNAL lsame, dlamch, dzasum, zlange
175 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.EQ.0 )
THEN
180 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
181 anorm = zlange(
'I', m, n, a, lda, rwork )
185 anorm = zlange(
'1', m, n, a, lda, rwork )
190 eps = dlamch(
'Epsilon' )
194 CALL zgemm( trans,
'No transpose', n1, nrhs, n2, -cone, a, lda, x,
195 $ ldx, cone, b, ldb )
202 bnorm = dzasum( n1, b( 1, j ), 1 )
203 xnorm = dzasum( n2, x( 1, j ), 1 )
204 IF( anorm.EQ.zero .AND. bnorm.EQ.zero )
THEN
206 ELSE IF( anorm.LE.zero .OR. xnorm.LE.zero )
THEN
209 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) /
210 $ ( max( m, n )*eps ) )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zqrt16(trans, m, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZQRT16