LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ srzt02()

real function srzt02 ( integer  M,
integer  N,
real, dimension( lda, * )  AF,
integer  LDA,
real, dimension( * )  TAU,
real, dimension( lwork )  WORK,
integer  LWORK 
)

SRZT02

Purpose:
 SRZT02 returns
      || I - Q'*Q || / ( M * eps)
 where the matrix Q is defined by the Householder transformations
 generated by STZRZF.
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrix AF.
[in]N
          N is INTEGER
          The number of columns of the matrix AF.
[in]AF
          AF is REAL array, dimension (LDA,N)
          The output of STZRZF.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array AF.
[in]TAU
          TAU is REAL array, dimension (M)
          Details of the Householder transformations as returned by
          STZRZF.
[out]WORK
          WORK is REAL array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          length of WORK array. LWORK >= N*N+N*NB.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 89 of file srzt02.f.

91 *
92 * -- LAPACK test routine --
93 * -- LAPACK is a software package provided by Univ. of Tennessee, --
94 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
95 *
96 * .. Scalar Arguments ..
97  INTEGER LDA, LWORK, M, N
98 * ..
99 * .. Array Arguments ..
100  REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
101 * ..
102 *
103 * =====================================================================
104 *
105 * .. Parameters ..
106  REAL ZERO, ONE
107  parameter( zero = 0.0e+0, one = 1.0e+0 )
108 * ..
109 * .. Local Scalars ..
110  INTEGER I, INFO
111 * ..
112 * .. Local Arrays ..
113  REAL RWORK( 1 )
114 * ..
115 * .. External Functions ..
116  REAL SLAMCH, SLANGE
117  EXTERNAL slamch, slange
118 * ..
119 * .. External Subroutines ..
120  EXTERNAL slaset, sormrz, xerbla
121 * ..
122 * .. Intrinsic Functions ..
123  INTRINSIC max, real
124 * ..
125 * .. Executable Statements ..
126 *
127  srzt02 = zero
128 *
129  IF( lwork.LT.n*n+n ) THEN
130  CALL xerbla( 'SRZT02', 7 )
131  RETURN
132  END IF
133 *
134 * Quick return if possible
135 *
136  IF( m.LE.0 .OR. n.LE.0 )
137  $ RETURN
138 *
139 * Q := I
140 *
141  CALL slaset( 'Full', n, n, zero, one, work, n )
142 *
143 * Q := P(1) * ... * P(m) * Q
144 *
145  CALL sormrz( 'Left', 'No transpose', n, n, m, n-m, af, lda, tau,
146  $ work, n, work( n*n+1 ), lwork-n*n, info )
147 *
148 * Q := P(m) * ... * P(1) * Q
149 *
150  CALL sormrz( 'Left', 'Transpose', n, n, m, n-m, af, lda, tau,
151  $ work, n, work( n*n+1 ), lwork-n*n, info )
152 *
153 * Q := Q - I
154 *
155  DO 10 i = 1, n
156  work( ( i-1 )*n+i ) = work( ( i-1 )*n+i ) - one
157  10 CONTINUE
158 *
159  srzt02 = slange( 'One-norm', n, n, work, n, rwork ) /
160  $ ( slamch( 'Epsilon' )*real( max( m, n ) ) )
161  RETURN
162 *
163 * End of SRZT02
164 *
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:110
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
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:114
subroutine sormrz(SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMRZ
Definition: sormrz.f:187
real function srzt02(M, N, AF, LDA, TAU, WORK, LWORK)
SRZT02
Definition: srzt02.f:91
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:68
Here is the call graph for this function: