136 SUBROUTINE zqlt02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
145 INTEGER K, LDA, LWORK, M, N
148 DOUBLE PRECISION RESULT( * ), RWORK( * )
149 COMPLEX*16 A( lda, * ), AF( lda, * ), L( lda, * ),
150 $ q( lda, * ), tau( * ), work( lwork )
156 DOUBLE PRECISION ZERO, ONE
157 parameter ( zero = 0.0d+0, one = 1.0d+0 )
159 parameter ( rogue = ( -1.0d+10, -1.0d+10 ) )
163 DOUBLE PRECISION ANORM, EPS, RESID
166 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANSY
167 EXTERNAL dlamch, zlange, zlansy
173 INTRINSIC dble, dcmplx, max
179 COMMON / srnamc / srnamt
185 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
191 eps = dlamch(
'Epsilon' )
195 CALL zlaset(
'Full', m, n, rogue, rogue, q, lda )
197 $
CALL zlacpy(
'Full', m-k, k, af( 1, n-k+1 ), lda,
198 $ q( 1, n-k+1 ), lda )
200 $
CALL zlacpy(
'Upper', k-1, k-1, af( m-k+1, n-k+2 ), lda,
201 $ q( m-k+1, n-k+2 ), lda )
206 CALL zungql( m, n, k, q, lda, tau( n-k+1 ), work, lwork, info )
210 CALL zlaset(
'Full', n, k, dcmplx( zero ), dcmplx( zero ),
211 $ l( m-n+1, n-k+1 ), lda )
212 CALL zlacpy(
'Lower', k, k, af( m-k+1, n-k+1 ), lda,
213 $ l( m-k+1, n-k+1 ), lda )
217 CALL zgemm(
'Conjugate transpose',
'No transpose', n, k, m,
218 $ dcmplx( -one ), q, lda, a( 1, n-k+1 ), lda,
219 $ dcmplx( one ), l( m-n+1, n-k+1 ), lda )
223 anorm = zlange(
'1', m, k, a( 1, n-k+1 ), lda, rwork )
224 resid = zlange(
'1', n, k, l( m-n+1, n-k+1 ), lda, rwork )
225 IF( anorm.GT.zero )
THEN
226 result( 1 ) = ( ( resid / dble( max( 1, m ) ) ) / anorm ) / eps
233 CALL zlaset(
'Full', n, n, dcmplx( zero ), dcmplx( one ), l, lda )
234 CALL zherk(
'Upper',
'Conjugate transpose', n, m, -one, q, lda,
239 resid = zlansy(
'1',
'Upper', n, l, lda, rwork )
241 result( 2 ) = ( resid / dble( max( 1, m ) ) ) / eps
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zungql(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
ZUNGQL
subroutine zqlt02(M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK, RWORK, RESULT)
ZQLT02
subroutine zgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZGEMM
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 zherk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
ZHERK