124 SUBROUTINE zqlt01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
132 INTEGER LDA, LWORK, M, N
135 DOUBLE PRECISION RESULT( * ), RWORK( * )
136 COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
137 $ q( lda, * ), tau( * ), work( lwork )
143 DOUBLE PRECISION ZERO, ONE
144 parameter( zero = 0.0d+0, one = 1.0d+0 )
146 parameter( rogue = ( -1.0d+10, -1.0d+10 ) )
150 DOUBLE PRECISION ANORM, EPS, RESID
153 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANSY
154 EXTERNAL dlamch, zlange, zlansy
160 INTRINSIC dble, dcmplx, max, min
166 COMMON / srnamc / srnamt
171 eps = dlamch(
'Epsilon' )
175 CALL zlacpy(
'Full', m, n, a, lda, af, lda )
180 CALL zgeqlf( m, n, af, lda, tau, work, lwork, info )
184 CALL zlaset(
'Full', m, m, rogue, rogue, q, lda )
186 IF( n.LT.m .AND. n.GT.0 )
187 $
CALL zlacpy(
'Full', m-n, n, af, lda, q( 1, m-n+1 ), lda )
189 $
CALL zlacpy(
'Upper', n-1, n-1, af( m-n+1, 2 ), lda,
190 $ q( m-n+1, m-n+2 ), lda )
193 $
CALL zlacpy(
'Upper', m-1, m-1, af( 1, n-m+2 ), lda,
200 CALL zungql( m, m, minmn, q, lda, tau, work, lwork, info )
204 CALL zlaset(
'Full', m, n, dcmplx( zero ), dcmplx( zero ), l,
208 $
CALL zlacpy(
'Lower', n, n, af( m-n+1, 1 ), lda,
209 $ l( m-n+1, 1 ), lda )
211 IF( n.GT.m .AND. m.GT.0 )
212 $
CALL zlacpy(
'Full', m, n-m, af, lda, l, lda )
214 $
CALL zlacpy(
'Lower', m, m, af( 1, n-m+1 ), lda,
215 $ l( 1, n-m+1 ), lda )
220 CALL zgemm(
'Conjugate transpose',
'No transpose', m, n, m,
221 $ dcmplx( -one ), q, lda, a, lda, dcmplx( one ), l,
226 anorm = zlange(
'1', m, n, a, lda, rwork )
227 resid = zlange(
'1', m, n, l, lda, rwork )
228 IF( anorm.GT.zero )
THEN
229 result( 1 ) = ( ( resid / dble( max( 1, m ) ) ) / anorm ) / eps
236 CALL zlaset(
'Full', m, m, dcmplx( zero ), dcmplx( one ), l, lda )
237 CALL zherk(
'Upper',
'Conjugate transpose', m, m, -one, q, lda,
242 resid = zlansy(
'1',
'Upper', m, l, lda, rwork )
244 result( 2 ) = ( resid / dble( max( 1, m ) ) ) / eps
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM