134 SUBROUTINE zlqt03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
142 INTEGER K, LDA, LWORK, M, N
145 DOUBLE PRECISION RESULT( * ), RWORK( * )
146 COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
147 $ q( lda, * ), tau( * ), work( lwork )
153 DOUBLE PRECISION ZERO, ONE
154 parameter( zero = 0.0d+0, one = 1.0d+0 )
156 parameter( rogue = ( -1.0d+10, -1.0d+10 ) )
159 CHARACTER SIDE, TRANS
160 INTEGER INFO, ISIDE, ITRANS, J, MC, NC
161 DOUBLE PRECISION CNORM, EPS, RESID
165 DOUBLE PRECISION DLAMCH, ZLANGE
166 EXTERNAL lsame, dlamch, zlange
175 INTRINSIC dble, dcmplx, max
181 COMMON / srnamc / srnamt
184 DATA iseed / 1988, 1989, 1990, 1991 /
188 eps = dlamch(
'Epsilon' )
192 CALL zlaset(
'Full', n, n, rogue, rogue, q, lda )
193 CALL zlacpy(
'Upper', k, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
198 CALL zunglq( n, n, k, q, lda, tau, work, lwork, info )
201 IF( iside.EQ.1 )
THEN
214 CALL zlarnv( 2, iseed, mc, c( 1, j ) )
216 cnorm = zlange(
'1', mc, nc, c, lda, rwork )
221 IF( itrans.EQ.1 )
THEN
229 CALL zlacpy(
'Full', mc, nc, c, lda, cc, lda )
234 CALL zunmlq( side, trans, mc, nc, k, af, lda, tau, cc, lda,
235 $ work, lwork, info )
239 IF( lsame( side,
'L' ) )
THEN
240 CALL zgemm( trans,
'No transpose', mc, nc, mc,
241 $ dcmplx( -one ), q, lda, c, lda,
242 $ dcmplx( one ), cc, lda )
244 CALL zgemm(
'No transpose', trans, mc, nc, nc,
245 $ dcmplx( -one ), c, lda, q, lda,
246 $ dcmplx( one ), cc, lda )
251 resid = zlange(
'1', mc, nc, cc, lda, rwork )
252 result( ( iside-1 )*2+itrans ) = resid /
253 $ ( dble( max( 1, n ) )*cnorm*eps )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlarnv(idist, iseed, n, x)
ZLARNV returns a vector of random numbers from a uniform or normal distribution.
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 zunglq(m, n, k, a, lda, tau, work, lwork, info)
ZUNGLQ
subroutine zunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMLQ
subroutine zlqt03(m, n, k, af, c, cc, q, lda, tau, work, lwork, rwork, result)
ZLQT03