124 SUBROUTINE zunt01( ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK,
133 INTEGER LDU, LWORK, M, N
134 DOUBLE PRECISION RESID
137 DOUBLE PRECISION RWORK( * )
138 COMPLEX*16 U( LDU, * ), WORK( * )
144 DOUBLE PRECISION ZERO, ONE
145 parameter( zero = 0.0d+0, one = 1.0d+0 )
149 INTEGER I, J, K, LDWORK, MNMIN
155 DOUBLE PRECISION DLAMCH, ZLANSY
157 EXTERNAL lsame, dlamch, zlansy, zdotc
163 INTRINSIC abs, dble, dcmplx, dimag, max, min
166 DOUBLE PRECISION CABS1
169 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
177 IF( m.LE.0 .OR. n.LE.0 )
180 eps = dlamch(
'Precision' )
181 IF( m.LT.n .OR. ( m.EQ.n .AND. lsame( rowcol,
'R' ) ) )
THEN
190 IF( ( mnmin+1 )*mnmin.LE.lwork )
THEN
195 IF( ldwork.GT.0 )
THEN
199 CALL zlaset(
'Upper', mnmin, mnmin, dcmplx( zero ),
200 $ dcmplx( one ), work, ldwork )
201 CALL zherk(
'Upper', transu, mnmin, k, -one, u, ldu, one, work,
206 resid = zlansy(
'1',
'Upper', mnmin, work, ldwork, rwork )
207 resid = ( resid / dble( k ) ) / eps
208 ELSE IF( transu.EQ.
'C' )
THEN
219 tmp = tmp - zdotc( m, u( 1, i ), 1, u( 1, j ), 1 )
220 resid = max( resid, cabs1( tmp ) )
223 resid = ( resid / dble( m ) ) / eps
235 tmp = tmp - zdotc( n, u( j, 1 ), ldu, u( i, 1 ), ldu )
236 resid = max( resid, cabs1( tmp ) )
239 resid = ( resid / dble( n ) ) / eps
subroutine zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
ZHERK
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zunt01(rowcol, m, n, u, ldu, work, lwork, rwork, resid)
ZUNT01