134 SUBROUTINE zqlt03( 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, MINMN, NC
161 DOUBLE PRECISION CNORM, EPS, RESID
165 DOUBLE PRECISION DLAMCH, ZLANGE
166 EXTERNAL lsame, dlamch, zlange
175 INTRINSIC dble, dcmplx, 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 zlaset(
'Full', m, m, rogue, rogue, q, lda )
204 IF( k.GT.0 .AND. m.GT.k )
205 $
CALL zlacpy(
'Full', m-k, k, af( 1, n-k+1 ), lda,
206 $ q( 1, m-k+1 ), lda )
208 $
CALL zlacpy(
'Upper', k-1, k-1, af( m-k+1, n-k+2 ), lda,
209 $ q( m-k+1, m-k+2 ), lda )
214 CALL zungql( m, m, k, q, lda, tau( minmn-k+1 ), work, lwork,
218 IF( iside.EQ.1 )
THEN
231 CALL zlarnv( 2, iseed, mc, c( 1, j ) )
233 cnorm = zlange(
'1', mc, nc, c, lda, rwork )
238 IF( itrans.EQ.1 )
THEN
246 CALL zlacpy(
'Full', mc, nc, c, lda, cc, lda )
252 $
CALL zunmql( side, trans, mc, nc, k, af( 1, n-k+1 ), lda,
253 $ tau( minmn-k+1 ), cc, lda, work, lwork,
258 IF( lsame( side,
'L' ) )
THEN
259 CALL zgemm( trans,
'No transpose', mc, nc, mc,
260 $ dcmplx( -one ), q, lda, c, lda,
261 $ dcmplx( one ), cc, lda )
263 CALL zgemm(
'No transpose', trans, mc, nc, nc,
264 $ dcmplx( -one ), c, lda, q, lda,
265 $ dcmplx( one ), cc, lda )
270 resid = zlange(
'1', mc, nc, cc, lda, rwork )
271 result( ( iside-1 )*2+itrans ) = resid /
272 $ ( dble( max( 1, m ) )*cnorm*eps )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM