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
156 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANSY
157 EXTERNAL dlamch, zlange, zlansy
163 INTRINSIC dble, dcmplx, max, min
169 COMMON / srnamc / srnamt
174 eps = dlamch(
'Epsilon' )
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
subroutine zunglq(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
ZUNGLQ
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
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 zlqt01(M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK, RWORK, RESULT)
ZLQT01
subroutine zherk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
ZHERK
subroutine zgelqf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
ZGELQF