106 SUBROUTINE zget01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
114 INTEGER LDA, LDAFAC, M, N
115 DOUBLE PRECISION RESID
119 DOUBLE PRECISION RWORK( * )
120 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
126 DOUBLE PRECISION ZERO, ONE
127 parameter( zero = 0.0d+0, one = 1.0d+0 )
129 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
133 DOUBLE PRECISION ANORM, EPS
137 DOUBLE PRECISION DLAMCH, ZLANGE
139 EXTERNAL dlamch, zlange, zdotu
151 IF( m.LE.0 .OR. n.LE.0 )
THEN
158 eps = dlamch(
'Epsilon' )
159 anorm = zlange(
'1', m, n, a, lda, rwork )
167 CALL ztrmv(
'Lower',
'No transpose',
'Unit', m, afac,
168 $ ldafac, afac( 1, k ), 1 )
175 CALL zscal( m-k, t, afac( k+1, k ), 1 )
176 CALL zgemv(
'No transpose', m-k, k-1, cone,
177 $ afac( k+1, 1 ), ldafac, afac( 1, k ), 1,
178 $ cone, afac( k+1, k ), 1 )
183 afac( k, k ) = t + zdotu( k-1, afac( k, 1 ), ldafac,
188 CALL ztrmv(
'Lower',
'No transpose',
'Unit', k-1, afac,
189 $ ldafac, afac( 1, k ), 1 )
192 CALL zlaswp( n, afac, ldafac, 1, min( m, n ), ipiv, -1 )
198 afac( i, j ) = afac( i, j ) - a( i, j )
204 resid = zlange(
'1', m, n, afac, ldafac, rwork )
206 IF( anorm.LE.zero )
THEN
210 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zlaswp(n, a, lda, k1, k2, ipiv, incx)
ZLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine zscal(n, za, zx, incx)
ZSCAL
subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx)
ZTRMV
subroutine zget01(m, n, a, lda, afac, ldafac, ipiv, rwork, resid)
ZGET01