134 SUBROUTINE drqt03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
142 INTEGER K, LDA, LWORK, M, N
145 DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
146 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
153 DOUBLE PRECISION ZERO, ONE
154 parameter( zero = 0.0d0, one = 1.0d0 )
155 DOUBLE PRECISION ROGUE
156 parameter( rogue = -1.0d+10 )
159 CHARACTER SIDE, TRANS
160 INTEGER INFO, ISIDE, ITRANS, J, MC, MINMN, NC
161 DOUBLE PRECISION CNORM, EPS, RESID
165 DOUBLE PRECISION DLAMCH, DLANGE
166 EXTERNAL lsame, dlamch, dlange
175 INTRINSIC dble, max, min
181 COMMON / srnamc / srnamt
184 DATA iseed / 1988, 1989, 1990, 1991 /
188 eps = dlamch(
'Epsilon' )
193 IF( minmn.EQ.0 )
THEN
203 CALL dlaset(
'Full', n, n, rogue, rogue, q, lda )
204 IF( k.GT.0 .AND. n.GT.k )
205 $
CALL dlacpy(
'Full', k, n-k, af( m-k+1, 1 ), lda,
206 $ q( n-k+1, 1 ), lda )
208 $
CALL dlacpy(
'Lower', k-1, k-1, af( m-k+2, n-k+1 ), lda,
209 $ q( n-k+2, n-k+1 ), lda )
214 CALL dorgrq( n, n, k, q, lda, tau( minmn-k+1 ), work, lwork,
218 IF( iside.EQ.1 )
THEN
231 CALL dlarnv( 2, iseed, mc, c( 1, j ) )
233 cnorm = dlange(
'1', mc, nc, c, lda, rwork )
238 IF( itrans.EQ.1 )
THEN
246 CALL dlacpy(
'Full', mc, nc, c, lda, cc, lda )
252 $
CALL dormrq( side, trans, mc, nc, k, af( m-k+1, 1 ), lda,
253 $ tau( minmn-k+1 ), cc, lda, work, lwork,
258 IF( lsame( side,
'L' ) )
THEN
259 CALL dgemm( trans,
'No transpose', mc, nc, mc, -one, q,
260 $ lda, c, lda, one, cc, lda )
262 CALL dgemm(
'No transpose', trans, mc, nc, nc, -one, c,
263 $ lda, q, lda, one, cc, lda )
268 resid = dlange(
'1', mc, nc, cc, lda, rwork )
269 result( ( iside-1 )*2+itrans ) = resid /
270 $ ( dble( max( 1, n ) )*cnorm*eps )
subroutine drqt03(m, n, k, af, c, cc, q, lda, tau, work, lwork, rwork, result)
DRQT03
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlarnv(idist, iseed, n, x)
DLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dorgrq(m, n, k, a, lda, tau, work, lwork, info)
DORGRQ
subroutine dormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMRQ