LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ zget10()

 subroutine zget10 ( integer M, integer N, complex*16, dimension( lda, * ) A, integer LDA, complex*16, dimension( ldb, * ) B, integer LDB, complex*16, dimension( * ) WORK, double precision, dimension( * ) RWORK, double precision RESULT )

ZGET10

Purpose:
``` ZGET10 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*16 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*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).``` [out] WORK ` WORK is COMPLEX*16 array, dimension (M)` [out] RWORK ` RWORK is COMPLEX*16 array, dimension (M)` [out] RESULT ``` RESULT is DOUBLE PRECISION RESULT = norm( A - B ) / ( norm(A) * M * EPS )```
Date
December 2016

Definition at line 101 of file zget10.f.

101 *
102 * -- LAPACK test routine (version 3.7.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 * December 2016
106 *
107 * .. Scalar Arguments ..
108  INTEGER lda, ldb, m, n
109  DOUBLE PRECISION result
110 * ..
111 * .. Array Arguments ..
112  DOUBLE PRECISION rwork( * )
113  COMPLEX*16 a( lda, * ), b( ldb, * ), work( * )
114 * ..
115 *
116 * =====================================================================
117 *
118 * .. Parameters ..
119  DOUBLE PRECISION one, zero
120  parameter( one = 1.0d+0, zero = 0.0d+0 )
121 * ..
122 * .. Local Scalars ..
123  INTEGER j
124  DOUBLE PRECISION anorm, eps, unfl, wnorm
125 * ..
126 * .. External Functions ..
127  DOUBLE PRECISION dlamch, dzasum, zlange
128  EXTERNAL dlamch, dzasum, zlange
129 * ..
130 * .. External Subroutines ..
131  EXTERNAL zaxpy, zcopy
132 * ..
133 * .. Intrinsic Functions ..
134  INTRINSIC dble, dcmplx, max, min
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 = dlamch( 'Safe minimum' )
146  eps = dlamch( 'Precision' )
147 *
148  wnorm = zero
149  DO 10 j = 1, n
150  CALL zcopy( m, a( 1, j ), 1, work, 1 )
151  CALL zaxpy( m, dcmplx( -one ), b( 1, j ), 1, work, 1 )
152  wnorm = max( wnorm, dzasum( n, work, 1 ) )
153  10 CONTINUE
154 *
155  anorm = max( zlange( '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, dble( m ) ) / ( m*eps )
164  END IF
165  END IF
166 *
167  RETURN
168 *
169 * End of ZGET10
170 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
Definition: zcopy.f:83
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:74
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY
Definition: zaxpy.f:90
Here is the call graph for this function:
Here is the caller graph for this function: