133 SUBROUTINE dqrt16( 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 A( lda, * ), B( ldb, * ), RWORK( * ),
154 DOUBLE PRECISION ZERO, ONE
155 parameter ( zero = 0.0d+0, one = 1.0d+0 )
159 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
163 DOUBLE PRECISION DASUM, DLAMCH, DLANGE
164 EXTERNAL lsame, dasum, dlamch, dlange
176 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.EQ.0 )
THEN
181 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
182 anorm = dlange(
'I', m, n, a, lda, rwork )
186 anorm = dlange(
'1', m, n, a, lda, rwork )
191 eps = dlamch(
'Epsilon' )
195 CALL dgemm( trans,
'No transpose', n1, nrhs, n2, -one, a, lda, x,
203 bnorm = dasum( n1, b( 1, j ), 1 )
204 xnorm = dasum( n2, x( 1, j ), 1 )
205 IF( anorm.EQ.zero .AND. bnorm.EQ.zero )
THEN
207 ELSE IF( anorm.LE.zero .OR. xnorm.LE.zero )
THEN
210 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) /
211 $ ( max( m, n )*eps ) )
subroutine dqrt16(TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
DQRT16
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM