 LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 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' * 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' * 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 ),```
Date
November 2011

Definition at line 121 of file zbdt02.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: