LAPACK  3.9.1
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 )
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 98 of file zget10.f.

99 *
100 * -- LAPACK test routine --
101 * -- LAPACK is a software package provided by Univ. of Tennessee, --
102 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
103 *
104 * .. Scalar Arguments ..
105  INTEGER LDA, LDB, M, N
106  DOUBLE PRECISION RESULT
107 * ..
108 * .. Array Arguments ..
109  DOUBLE PRECISION RWORK( * )
110  COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
111 * ..
112 *
113 * =====================================================================
114 *
115 * .. Parameters ..
116  DOUBLE PRECISION ONE, ZERO
117  parameter( one = 1.0d+0, zero = 0.0d+0 )
118 * ..
119 * .. Local Scalars ..
120  INTEGER J
121  DOUBLE PRECISION ANORM, EPS, UNFL, WNORM
122 * ..
123 * .. External Functions ..
124  DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
125  EXTERNAL dlamch, dzasum, zlange
126 * ..
127 * .. External Subroutines ..
128  EXTERNAL zaxpy, zcopy
129 * ..
130 * .. Intrinsic Functions ..
131  INTRINSIC dble, dcmplx, max, min
132 * ..
133 * .. Executable Statements ..
134 *
135 * Quick return if possible
136 *
137  IF( m.LE.0 .OR. n.LE.0 ) THEN
138  result = zero
139  RETURN
140  END IF
141 *
142  unfl = dlamch( 'Safe minimum' )
143  eps = dlamch( 'Precision' )
144 *
145  wnorm = zero
146  DO 10 j = 1, n
147  CALL zcopy( m, a( 1, j ), 1, work, 1 )
148  CALL zaxpy( m, dcmplx( -one ), b( 1, j ), 1, work, 1 )
149  wnorm = max( wnorm, dzasum( n, work, 1 ) )
150  10 CONTINUE
151 *
152  anorm = max( zlange( '1', m, n, a, lda, rwork ), unfl )
153 *
154  IF( anorm.GT.wnorm ) THEN
155  result = ( wnorm / anorm ) / ( m*eps )
156  ELSE
157  IF( anorm.LT.one ) THEN
158  result = ( min( wnorm, m*anorm ) / anorm ) / ( m*eps )
159  ELSE
160  result = min( wnorm / anorm, dble( m ) ) / ( m*eps )
161  END IF
162  END IF
163 *
164  RETURN
165 *
166 * End of ZGET10
167 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:69
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY
Definition: zaxpy.f:88
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
Definition: zcopy.f:81
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: