LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
real function sqrt11 ( integer  M,
integer  K,
real, dimension( lda, * )  A,
integer  LDA,
real, dimension( * )  TAU,
real, dimension( lwork )  WORK,
integer  LWORK 
)

SQRT11

Purpose:
 SQRT11 computes the test ratio

       || Q'*Q - I || / (eps * m)

 where the orthogonal matrix Q is represented as a product of
 elementary transformations.  Each transformation has the form

    H(k) = I - tau(k) v(k) v(k)'

 where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
 [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
 in A(k+1:m,k).
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrix A.
[in]K
          K is INTEGER
          The number of columns of A whose subdiagonal entries
          contain information about orthogonal transformations.
[in]A
          A is REAL array, dimension (LDA,K)
          The (possibly partial) output of a QR reduction routine.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.
[in]TAU
          TAU is REAL array, dimension (K)
          The scaling factors tau for the elementary transformations as
          computed by the QR factorization routine.
[out]WORK
          WORK is REAL array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          The length of the array WORK.  LWORK >= M*M + M.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 100 of file sqrt11.f.

100 *
101 * -- LAPACK test routine (version 3.4.0) --
102 * -- LAPACK is a software package provided by Univ. of Tennessee, --
103 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
104 * November 2011
105 *
106 * .. Scalar Arguments ..
107  INTEGER k, lda, lwork, m
108 * ..
109 * .. Array Arguments ..
110  REAL a( lda, * ), tau( * ), work( lwork )
111 * ..
112 *
113 * =====================================================================
114 *
115 * .. Parameters ..
116  REAL zero, one
117  parameter ( zero = 0.0e0, one = 1.0e0 )
118 * ..
119 * .. Local Scalars ..
120  INTEGER info, j
121 * ..
122 * .. External Functions ..
123  REAL slamch, slange
124  EXTERNAL slamch, slange
125 * ..
126 * .. External Subroutines ..
127  EXTERNAL slaset, sorm2r, xerbla
128 * ..
129 * .. Intrinsic Functions ..
130  INTRINSIC real
131 * ..
132 * .. Local Arrays ..
133  REAL rdummy( 1 )
134 * ..
135 * .. Executable Statements ..
136 *
137  sqrt11 = zero
138 *
139 * Test for sufficient workspace
140 *
141  IF( lwork.LT.m*m+m ) THEN
142  CALL xerbla( 'SQRT11', 7 )
143  RETURN
144  END IF
145 *
146 * Quick return if possible
147 *
148  IF( m.LE.0 )
149  $ RETURN
150 *
151  CALL slaset( 'Full', m, m, zero, one, work, m )
152 *
153 * Form Q
154 *
155  CALL sorm2r( 'Left', 'No transpose', m, m, k, a, lda, tau, work,
156  $ m, work( m*m+1 ), info )
157 *
158 * Form Q'*Q
159 *
160  CALL sorm2r( 'Left', 'Transpose', m, m, k, a, lda, tau, work, m,
161  $ work( m*m+1 ), info )
162 *
163  DO 10 j = 1, m
164  work( ( j-1 )*m+j ) = work( ( j-1 )*m+j ) - one
165  10 CONTINUE
166 *
167  sqrt11 = slange( 'One-norm', m, m, work, m, rdummy ) /
168  $ ( REAL( m )*slamch( 'Epsilon' ) )
169 *
170  RETURN
171 *
172 * End of SQRT11
173 *
real function sqrt11(M, K, A, LDA, TAU, WORK, LWORK)
SQRT11
Definition: sqrt11.f:100
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
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...
Definition: slaset.f:112
real function slange(NORM, M, N, A, LDA, WORK)
SLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: slange.f:116
subroutine sorm2r(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO)
SORM2R multiplies a general matrix by the orthogonal matrix from a QR factorization determined by sge...
Definition: sorm2r.f:161
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69

Here is the call graph for this function: