126 SUBROUTINE zlqt01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
135 INTEGER lda, lwork, m, n
138 DOUBLE PRECISION result( * ), rwork( * )
139 COMPLEX*16 a( lda, * ), af( lda, * ), l( lda, * ),
140 $ q( lda, * ), tau( * ), work( lwork )
146 DOUBLE PRECISION zero, one
147 parameter( zero = 0.0d+0, one = 1.0d+0 )
149 parameter( rogue = ( -1.0d+10, -1.0d+10 ) )
153 DOUBLE PRECISION anorm, eps, resid
163 INTRINSIC dble, dcmplx, max, min
169 common / srnamc / srnamt
178 CALL
zlacpy(
'Full', m, n, a, lda, af, lda )
183 CALL
zgelqf( m, n, af, lda, tau, work, lwork, info )
187 CALL
zlaset(
'Full', n, n, rogue, rogue, q, lda )
189 $ CALL
zlacpy(
'Upper', m, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
194 CALL
zunglq( n, n, minmn, q, lda, tau, work, lwork, info )
198 CALL
zlaset(
'Full', m, n, dcmplx( zero ), dcmplx( zero ), l,
200 CALL
zlacpy(
'Lower', m, n, af, lda, l, lda )
204 CALL
zgemm(
'No transpose',
'Conjugate transpose', m, n, n,
205 $ dcmplx( -one ), a, lda, q, lda, dcmplx( one ), l,
210 anorm =
zlange(
'1', m, n, a, lda, rwork )
211 resid =
zlange(
'1', m, n, l, lda, rwork )
212 IF( anorm.GT.zero )
THEN
213 result( 1 ) = ( ( resid / dble( max( 1, n ) ) ) / anorm ) / eps
220 CALL
zlaset(
'Full', n, n, dcmplx( zero ), dcmplx( one ), l, lda )
221 CALL
zherk(
'Upper',
'No transpose', n, n, -one, q, lda, one, l,
226 resid =
zlansy(
'1',
'Upper', n, l, lda, rwork )
228 result( 2 ) = ( resid / dble( max( 1, n ) ) ) / eps