133 SUBROUTINE sqrt16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
143 INTEGER lda, ldb, ldx, m, n, nrhs
147 REAL a( lda, * ), b( ldb, * ), rwork( * ),
155 parameter( zero = 0.0e+0, one = 1.0e+0 )
159 REAL anorm, bnorm, eps, xnorm
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 =
slange(
'I', m, n, a, lda, rwork )
186 anorm =
slange(
'1', m, n, a, lda, rwork )
195 CALL
sgemm( trans,
'No transpose', n1, nrhs, n2, -one, a, lda, x,
203 bnorm =
sasum( n1, b( 1, j ), 1 )
204 xnorm =
sasum( 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 ) )