LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ sbdt02()

 subroutine sbdt02 ( integer M, integer N, real, dimension( ldb, * ) B, integer LDB, real, dimension( ldc, * ) C, integer LDC, real, dimension( ldu, * ) U, integer LDU, real, dimension( * ) WORK, real RESID )

SBDT02

Purpose:
``` SBDT02 tests the change of basis C = U**H * B by computing the
residual

RESID = norm(B - U * C) / ( max(m,n) * norm(B) * EPS ),

where B and C are M by N matrices, U is an M by M orthogonal matrix,
and EPS is the machine precision.```
Parameters
 [in] M ``` M is INTEGER The number of rows of the matrices B and C and the order of the matrix Q.``` [in] N ``` N is INTEGER The number of columns of the matrices B and C.``` [in] B ``` B is REAL array, dimension (LDB,N) The m by n matrix B.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >= max(1,M).``` [in] C ``` C is REAL array, dimension (LDC,N) The m by n matrix C, assumed to contain U**H * B.``` [in] LDC ``` LDC is INTEGER The leading dimension of the array C. LDC >= max(1,M).``` [in] U ``` U is REAL array, dimension (LDU,M) The m by m orthogonal matrix U.``` [in] LDU ``` LDU is INTEGER The leading dimension of the array U. LDU >= max(1,M).``` [out] WORK ` WORK is REAL array, dimension (M)` [out] RESID ``` RESID is REAL RESID = norm(B - U * C) / ( max(m,n) * norm(B) * EPS ),```

Definition at line 111 of file sbdt02.f.

112*
113* -- LAPACK test routine --
114* -- LAPACK is a software package provided by Univ. of Tennessee, --
115* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
116*
117* .. Scalar Arguments ..
118 INTEGER LDB, LDC, LDU, M, N
119 REAL RESID
120* ..
121* .. Array Arguments ..
122 REAL B( LDB, * ), C( LDC, * ), U( LDU, * ),
123 \$ WORK( * )
124* ..
125*
126* ======================================================================
127*
128* .. Parameters ..
129 REAL ZERO, ONE
130 parameter( zero = 0.0e+0, one = 1.0e+0 )
131* ..
132* .. Local Scalars ..
133 INTEGER J
134 REAL BNORM, EPS, REALMN
135* ..
136* .. External Functions ..
137 REAL SASUM, SLAMCH, SLANGE
138 EXTERNAL sasum, slamch, slange
139* ..
140* .. External Subroutines ..
141 EXTERNAL scopy, sgemv
142* ..
143* .. Intrinsic Functions ..
144 INTRINSIC max, min, real
145* ..
146* .. Executable Statements ..
147*
148* Quick return if possible
149*
150 resid = zero
151 IF( m.LE.0 .OR. n.LE.0 )
152 \$ RETURN
153 realmn = real( max( m, n ) )
154 eps = slamch( 'Precision' )
155*
156* Compute norm(B - U * C)
157*
158 DO 10 j = 1, n
159 CALL scopy( m, b( 1, j ), 1, work, 1 )
160 CALL sgemv( 'No transpose', m, m, -one, u, ldu, c( 1, j ), 1,
161 \$ one, work, 1 )
162 resid = max( resid, sasum( m, work, 1 ) )
163 10 CONTINUE
164*
165* Compute norm of B.
166*
167 bnorm = slange( '1', m, n, b, ldb, work )
168*
169 IF( bnorm.LE.zero ) THEN
170 IF( resid.NE.zero )
171 \$ resid = one / eps
172 ELSE
173 IF( bnorm.GE.resid ) THEN
174 resid = ( resid / bnorm ) / ( realmn*eps )
175 ELSE
176 IF( bnorm.LT.one ) THEN
177 resid = ( min( resid, realmn*bnorm ) / bnorm ) /
178 \$ ( realmn*eps )
179 ELSE
180 resid = min( resid / bnorm, realmn ) / ( realmn*eps )
181 END IF
182 END IF
183 END IF
184 RETURN
185*
186* End of SBDT02
187*
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 scopy(N, SX, INCX, SY, INCY)
SCOPY
Definition: scopy.f:82
real function sasum(N, SX, INCX)
SASUM
Definition: sasum.f:72
subroutine sgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
SGEMV
Definition: sgemv.f:156
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:68
Here is the call graph for this function:
Here is the caller graph for this function: