124 SUBROUTINE dqlt01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
132 INTEGER LDA, LWORK, M, N
135 DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
136 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
143 DOUBLE PRECISION ZERO, ONE
144 parameter( zero = 0.0d+0, one = 1.0d+0 )
145 DOUBLE PRECISION ROGUE
146 parameter( rogue = -1.0d+10 )
150 DOUBLE PRECISION ANORM, EPS, RESID
153 DOUBLE PRECISION DLAMCH, DLANGE, DLANSY
154 EXTERNAL dlamch, dlange, dlansy
160 INTRINSIC dble, max, min
166 COMMON / srnamc / srnamt
171 eps = dlamch(
'Epsilon' )
175 CALL dlacpy(
'Full', m, n, a, lda, af, lda )
180 CALL dgeqlf( m, n, af, lda, tau, work, lwork, info )
184 CALL dlaset(
'Full', m, m, rogue, rogue, q, lda )
186 IF( n.LT.m .AND. n.GT.0 )
187 $
CALL dlacpy(
'Full', m-n, n, af, lda, q( 1, m-n+1 ), lda )
189 $
CALL dlacpy(
'Upper', n-1, n-1, af( m-n+1, 2 ), lda,
190 $ q( m-n+1, m-n+2 ), lda )
193 $
CALL dlacpy(
'Upper', m-1, m-1, af( 1, n-m+2 ), lda,
200 CALL dorgql( m, m, minmn, q, lda, tau, work, lwork, info )
204 CALL dlaset(
'Full', m, n, zero, zero, l, lda )
207 $
CALL dlacpy(
'Lower', n, n, af( m-n+1, 1 ), lda,
208 $ l( m-n+1, 1 ), lda )
210 IF( n.GT.m .AND. m.GT.0 )
211 $
CALL dlacpy(
'Full', m, n-m, af, lda, l, lda )
213 $
CALL dlacpy(
'Lower', m, m, af( 1, n-m+1 ), lda,
214 $ l( 1, n-m+1 ), lda )
219 CALL dgemm(
'Transpose',
'No transpose', m, n, m, -one, q, lda, a,
224 anorm = dlange(
'1', m, n, a, lda, rwork )
225 resid = dlange(
'1', m, n, l, lda, rwork )
226 IF( anorm.GT.zero )
THEN
227 result( 1 ) = ( ( resid / dble( max( 1, m ) ) ) / anorm ) / eps
234 CALL dlaset(
'Full', m, m, zero, one, l, lda )
235 CALL dsyrk(
'Upper',
'Transpose', m, m, -one, q, lda, one, l,
240 resid = dlansy(
'1',
'Upper', m, l, lda, rwork )
242 result( 2 ) = ( resid / dble( max( 1, m ) ) ) / eps
subroutine dqlt01(m, n, a, af, q, l, lda, tau, work, lwork, rwork, result)
DQLT01
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dgeqlf(m, n, a, lda, tau, work, lwork, info)
DGEQLF
subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
DSYRK
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dorgql(m, n, k, a, lda, tau, work, lwork, info)
DORGQL