133 SUBROUTINE zlqt02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
141 INTEGER K, LDA, LWORK, M, N
144 DOUBLE PRECISION RESULT( * ), RWORK( * )
145 COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
146 $ q( lda, * ), tau( * ), work( lwork )
152 DOUBLE PRECISION ZERO, ONE
153 parameter( zero = 0.0d+0, one = 1.0d+0 )
155 parameter( rogue = ( -1.0d+10, -1.0d+10 ) )
159 DOUBLE PRECISION ANORM, EPS, RESID
162 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANSY
163 EXTERNAL dlamch, zlange, zlansy
169 INTRINSIC dble, dcmplx, max
175 COMMON / srnamc / srnamt
179 eps = dlamch(
'Epsilon' )
183 CALL zlaset(
'Full', m, n, rogue, rogue, q, lda )
184 CALL zlacpy(
'Upper', k, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
189 CALL zunglq( m, n, k, q, lda, tau, work, lwork, info )
193 CALL zlaset(
'Full', k, m, dcmplx( zero ), dcmplx( zero ), l,
195 CALL zlacpy(
'Lower', k, m, af, lda, l, lda )
199 CALL zgemm(
'No transpose',
'Conjugate transpose', k, m, n,
200 $ dcmplx( -one ), a, lda, q, lda, dcmplx( one ), l,
205 anorm = zlange(
'1', k, n, a, lda, rwork )
206 resid = zlange(
'1', k, m, l, lda, rwork )
207 IF( anorm.GT.zero )
THEN
208 result( 1 ) = ( ( resid / dble( max( 1, n ) ) ) / anorm ) / eps
215 CALL zlaset(
'Full', m, m, dcmplx( zero ), dcmplx( one ), l, lda )
216 CALL zherk(
'Upper',
'No transpose', m, n, -one, q, lda, one, l,
221 resid = zlansy(
'1',
'Upper', m, l, lda, rwork )
223 result( 2 ) = ( resid / dble( max( 1, n ) ) ) / eps
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
ZHERK
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
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 zlqt02(m, n, k, a, af, q, l, lda, tau, work, lwork, rwork, result)
ZLQT02