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

## ◆ zbdt02()

 subroutine zbdt02 ( integer M, integer N, complex*16, dimension( ldb, * ) B, integer LDB, complex*16, dimension( ldc, * ) C, integer LDC, complex*16, dimension( ldu, * ) U, integer LDU, complex*16, dimension( * ) WORK, double precision, dimension( * ) RWORK, double precision RESID )

ZBDT02

Purpose:
``` ZBDT02 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 COMPLEX*16 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 COMPLEX*16 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 COMPLEX*16 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 COMPLEX*16 array, dimension (M)` [out] RWORK ` RWORK is DOUBLE PRECISION array, dimension (M)` [out] RESID ``` RESID is DOUBLE PRECISION RESID = norm(B - U * C) / ( max(m,n) * norm(B) * EPS ),```

Definition at line 118 of file zbdt02.f.

120*
121* -- LAPACK test routine --
122* -- LAPACK is a software package provided by Univ. of Tennessee, --
123* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
124*
125* .. Scalar Arguments ..
126 INTEGER LDB, LDC, LDU, M, N
127 DOUBLE PRECISION RESID
128* ..
129* .. Array Arguments ..
130 DOUBLE PRECISION RWORK( * )
131 COMPLEX*16 B( LDB, * ), C( LDC, * ), U( LDU, * ),
132 \$ WORK( * )
133* ..
134*
135* ======================================================================
136*
137* .. Parameters ..
138 DOUBLE PRECISION ZERO, ONE
139 parameter( zero = 0.0d+0, one = 1.0d+0 )
140* ..
141* .. Local Scalars ..
142 INTEGER J
143 DOUBLE PRECISION BNORM, EPS, REALMN
144* ..
145* .. External Functions ..
146 DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
147 EXTERNAL dlamch, dzasum, zlange
148* ..
149* .. External Subroutines ..
150 EXTERNAL zcopy, zgemv
151* ..
152* .. Intrinsic Functions ..
153 INTRINSIC dble, dcmplx, max, min
154* ..
155* .. Executable Statements ..
156*
157* Quick return if possible
158*
159 resid = zero
160 IF( m.LE.0 .OR. n.LE.0 )
161 \$ RETURN
162 realmn = dble( max( m, n ) )
163 eps = dlamch( 'Precision' )
164*
165* Compute norm(B - U * C)
166*
167 DO 10 j = 1, n
168 CALL zcopy( m, b( 1, j ), 1, work, 1 )
169 CALL zgemv( 'No transpose', m, m, -dcmplx( one ), u, ldu,
170 \$ c( 1, j ), 1, dcmplx( one ), work, 1 )
171 resid = max( resid, dzasum( m, work, 1 ) )
172 10 CONTINUE
173*
174* Compute norm of B.
175*
176 bnorm = zlange( '1', m, n, b, ldb, rwork )
177*
178 IF( bnorm.LE.zero ) THEN
179 IF( resid.NE.zero )
180 \$ resid = one / eps
181 ELSE
182 IF( bnorm.GE.resid ) THEN
183 resid = ( resid / bnorm ) / ( realmn*eps )
184 ELSE
185 IF( bnorm.LT.one ) THEN
186 resid = ( min( resid, realmn*bnorm ) / bnorm ) /
187 \$ ( realmn*eps )
188 ELSE
189 resid = min( resid / bnorm, realmn ) / ( realmn*eps )
190 END IF
191 END IF
192 END IF
193 RETURN
194*
195* End of ZBDT02
196*
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:69
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
Definition: zcopy.f:81
subroutine zgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
ZGEMV
Definition: zgemv.f:158
double precision function zlange(NORM, M, N, A, LDA, WORK)
ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: zlange.f:115
double precision function dzasum(N, ZX, INCX)
DZASUM
Definition: dzasum.f:72
Here is the call graph for this function:
Here is the caller graph for this function: