131 SUBROUTINE dqrt16( 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 A( LDA, * ), B( LDB, * ), RWORK( * ),
151 DOUBLE PRECISION ZERO, ONE
152 parameter( zero = 0.0d+0, one = 1.0d+0 )
156 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
160 DOUBLE PRECISION DASUM, DLAMCH, DLANGE
161 EXTERNAL lsame, dasum, dlamch, dlange
173 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.EQ.0 )
THEN
178 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
179 anorm = dlange(
'I', m, n, a, lda, rwork )
183 anorm = dlange(
'1', m, n, a, lda, rwork )
188 eps = dlamch(
'Epsilon' )
192 CALL dgemm( trans,
'No transpose', n1, nrhs, n2, -one, a, lda, x,
200 bnorm = dasum( n1, b( 1, j ), 1 )
201 xnorm = dasum( n2, x( 1, j ), 1 )
202 IF( anorm.EQ.zero .AND. bnorm.EQ.zero )
THEN
204 ELSE IF( anorm.LE.zero .OR. xnorm.LE.zero )
THEN
207 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) /
208 $ ( 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