 LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine cget10 ( integer M, integer N, complex, dimension( lda, * ) A, integer LDA, complex, dimension( ldb, * ) B, integer LDB, complex, dimension( * ) WORK, real, dimension( * ) RWORK, real RESULT )

CGET10

Purpose:
``` CGET10 compares two matrices A and B and computes the ratio
RESULT = norm( A - B ) / ( norm(A) * M * EPS )```
Parameters
 [in] M ``` M is INTEGER The number of rows of the matrices A and B.``` [in] N ``` N is INTEGER The number of columns of the matrices A and B.``` [in] A ``` A is COMPLEX array, dimension (LDA,N) The m by n matrix A.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M).``` [in] B ``` B is COMPLEX 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).``` [out] WORK ` WORK is COMPLEX array, dimension (M)` [out] RWORK ` RWORK is COMPLEX array, dimension (M)` [out] RESULT ``` RESULT is REAL RESULT = norm( A - B ) / ( norm(A) * M * EPS )```
Date
November 2011

Definition at line 101 of file cget10.f.

101 *
102 * -- LAPACK test routine (version 3.4.0) --
103 * -- LAPACK is a software package provided by Univ. of Tennessee, --
104 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
105 * November 2011
106 *
107 * .. Scalar Arguments ..
108  INTEGER lda, ldb, m, n
109  REAL result
110 * ..
111 * .. Array Arguments ..
112  REAL rwork( * )
113  COMPLEX a( lda, * ), b( ldb, * ), work( * )
114 * ..
115 *
116 * =====================================================================
117 *
118 * .. Parameters ..
119  REAL one, zero
120  parameter ( one = 1.0e+0, zero = 0.0e+0 )
121 * ..
122 * .. Local Scalars ..
123  INTEGER j
124  REAL anorm, eps, unfl, wnorm
125 * ..
126 * .. External Functions ..
127  REAL scasum, slamch, clange
128  EXTERNAL scasum, slamch, clange
129 * ..
130 * .. External Subroutines ..
131  EXTERNAL caxpy, ccopy
132 * ..
133 * .. Intrinsic Functions ..
134  INTRINSIC max, min, real
135 * ..
136 * .. Executable Statements ..
137 *
138 * Quick return if possible
139 *
140  IF( m.LE.0 .OR. n.LE.0 ) THEN
141  result = zero
142  RETURN
143  END IF
144 *
145  unfl = slamch( 'Safe minimum' )
146  eps = slamch( 'Precision' )
147 *
148  wnorm = zero
149  DO 10 j = 1, n
150  CALL ccopy( m, a( 1, j ), 1, work, 1 )
151  CALL caxpy( m, cmplx( -one ), b( 1, j ), 1, work, 1 )
152  wnorm = max( wnorm, scasum( n, work, 1 ) )
153  10 CONTINUE
154 *
155  anorm = max( clange( '1', m, n, a, lda, rwork ), unfl )
156 *
157  IF( anorm.GT.wnorm ) THEN
158  result = ( wnorm / anorm ) / ( m*eps )
159  ELSE
160  IF( anorm.LT.one ) THEN
161  result = ( min( wnorm, m*anorm ) / anorm ) / ( m*eps )
162  ELSE
163  result = min( wnorm / anorm, REAL( M ) ) / ( m*eps )
164  END IF
165  END IF
166 *
167  RETURN
168 *
169 * End of CGET10
170 *
real function scasum(N, CX, INCX)
SCASUM
Definition: scasum.f:54
real function clange(NORM, M, N, A, LDA, WORK)
CLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: clange.f:117
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
Definition: ccopy.f:52
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
Definition: caxpy.f:53

Here is the call graph for this function:

Here is the caller graph for this function: