133 SUBROUTINE slqt02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
141 INTEGER K, LDA, LWORK, M, N
144 REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
145 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
153 parameter( zero = 0.0e+0, one = 1.0e+0 )
155 parameter( rogue = -1.0e+10 )
159 REAL ANORM, EPS, RESID
162 REAL SLAMCH, SLANGE, SLANSY
163 EXTERNAL slamch, slange, slansy
175 COMMON / srnamc / srnamt
179 eps = slamch(
'Epsilon' )
183 CALL slaset(
'Full', m, n, rogue, rogue, q, lda )
184 CALL slacpy(
'Upper', k, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
189 CALL sorglq( m, n, k, q, lda, tau, work, lwork, info )
193 CALL slaset(
'Full', k, m, zero, zero, l, lda )
194 CALL slacpy(
'Lower', k, m, af, lda, l, lda )
198 CALL sgemm(
'No transpose',
'Transpose', k, m, n, -one, a, lda, q,
203 anorm = slange(
'1', k, n, a, lda, rwork )
204 resid = slange(
'1', k, m, l, lda, rwork )
205 IF( anorm.GT.zero )
THEN
206 result( 1 ) = ( ( resid / real( max( 1, n ) ) ) / anorm ) / eps
213 CALL slaset(
'Full', m, m, zero, one, l, lda )
214 CALL ssyrk(
'Upper',
'No transpose', m, n, -one, q, lda, one, l,
219 resid = slansy(
'1',
'Upper', m, l, lda, rwork )
221 result( 2 ) = ( resid / real( max( 1, n ) ) ) / eps
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
SSYRK
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sorglq(m, n, k, a, lda, tau, work, lwork, info)
SORGLQ
subroutine slqt02(m, n, k, a, af, q, l, lda, tau, work, lwork, rwork, result)
SLQT02