124 SUBROUTINE zlqt01( 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 zgelqf( m, n, af, lda, tau, work, lwork, info )
184 CALL zlaset(
'Full', n, n, rogue, rogue, q, lda )
186 $
CALL zlacpy(
'Upper', m, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
191 CALL zunglq( n, n, minmn, q, lda, tau, work, lwork, info )
195 CALL zlaset(
'Full', m, n, dcmplx( zero ), dcmplx( zero ), l,
197 CALL zlacpy(
'Lower', m, n, af, lda, l, lda )
201 CALL zgemm(
'No transpose',
'Conjugate transpose', m, n, n,
202 $ dcmplx( -one ), a, lda, q, lda, dcmplx( one ), l,
207 anorm = zlange(
'1', m, n, a, lda, rwork )
208 resid = zlange(
'1', m, n, l, lda, rwork )
209 IF( anorm.GT.zero )
THEN
210 result( 1 ) = ( ( resid / dble( max( 1, n ) ) ) / anorm ) / eps
217 CALL zlaset(
'Full', n, n, dcmplx( zero ), dcmplx( one ), l, lda )
218 CALL zherk(
'Upper',
'No transpose', n, n, -one, q, lda, one, l,
223 resid = zlansy(
'1',
'Upper', n, l, lda, rwork )
225 result( 2 ) = ( resid / dble( max( 1, n ) ) ) / eps
subroutine zgelqf(m, n, a, lda, tau, work, lwork, info)
ZGELQF
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 zlqt01(m, n, a, af, q, l, lda, tau, work, lwork, rwork, result)
ZLQT01