 LAPACK  3.10.1 LAPACK: Linear Algebra PACKage

## ◆ dbdt02()

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

DBDT02

Purpose:
``` DBDT02 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 DOUBLE PRECISION 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 DOUBLE PRECISION 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 DOUBLE PRECISION 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 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 111 of file dbdt02.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  DOUBLE PRECISION RESID
120 * ..
121 * .. Array Arguments ..
122  DOUBLE PRECISION B( LDB, * ), C( LDC, * ), U( LDU, * ),
123  \$ WORK( * )
124 * ..
125 *
126 * ======================================================================
127 *
128 * .. Parameters ..
129  DOUBLE PRECISION ZERO, ONE
130  parameter( zero = 0.0d+0, one = 1.0d+0 )
131 * ..
132 * .. Local Scalars ..
133  INTEGER J
134  DOUBLE PRECISION BNORM, EPS, REALMN
135 * ..
136 * .. External Functions ..
137  DOUBLE PRECISION DASUM, DLAMCH, DLANGE
138  EXTERNAL dasum, dlamch, dlange
139 * ..
140 * .. External Subroutines ..
141  EXTERNAL dcopy, dgemv
142 * ..
143 * .. Intrinsic Functions ..
144  INTRINSIC dble, max, min
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 = dble( max( m, n ) )
154  eps = dlamch( 'Precision' )
155 *
156 * Compute norm(B - U * C)
157 *
158  DO 10 j = 1, n
159  CALL dcopy( m, b( 1, j ), 1, work, 1 )
160  CALL dgemv( 'No transpose', m, m, -one, u, ldu, c( 1, j ), 1,
161  \$ one, work, 1 )
162  resid = max( resid, dasum( m, work, 1 ) )
163  10 CONTINUE
164 *
165 * Compute norm of B.
166 *
167  bnorm = dlange( '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 DBDT02
187 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:69
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
Definition: dcopy.f:82
double precision function dasum(N, DX, INCX)
DASUM
Definition: dasum.f:71
subroutine dgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
DGEMV
Definition: dgemv.f:156
double precision function dlange(NORM, M, N, A, LDA, WORK)
DLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: dlange.f:114
Here is the call graph for this function:
Here is the caller graph for this function: