131 SUBROUTINE cqrt16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
140 INTEGER LDA, LDB, LDX, M, N, NRHS
145 COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
152 parameter( zero = 0.0e+0, one = 1.0e+0 )
154 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
158 REAL ANORM, BNORM, EPS, XNORM
162 REAL CLANGE, SCASUM, SLAMCH
163 EXTERNAL lsame, clange, scasum, slamch
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 = clange(
'I', m, n, a, lda, rwork )
185 anorm = clange(
'1', m, n, a, lda, rwork )
190 eps = slamch(
'Epsilon' )
194 CALL cgemm( trans,
'No transpose', n1, nrhs, n2, -cone, a, lda, x,
195 $ ldx, cone, b, ldb )
202 bnorm = scasum( n1, b( 1, j ), 1 )
203 xnorm = scasum( 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 cqrt16(trans, m, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
CQRT16
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM