LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine dget10 ( integer  M,
integer  N,
double precision, dimension( lda, * )  A,
integer  LDA,
double precision, dimension( ldb, * )  B,
integer  LDB,
double precision, dimension( * )  WORK,
double precision  RESULT 
)

DGET10

Purpose:
 DGET10 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 DOUBLE PRECISION 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 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).
[out]WORK
          WORK is DOUBLE PRECISION 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.
Date
November 2011

Definition at line 95 of file dget10.f.

95 *
96 * -- LAPACK test routine (version 3.4.0) --
97 * -- LAPACK is a software package provided by Univ. of Tennessee, --
98 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
99 * November 2011
100 *
101 * .. Scalar Arguments ..
102  INTEGER lda, ldb, m, n
103  DOUBLE PRECISION result
104 * ..
105 * .. Array Arguments ..
106  DOUBLE PRECISION a( lda, * ), b( ldb, * ), work( * )
107 * ..
108 *
109 * =====================================================================
110 *
111 * .. Parameters ..
112  DOUBLE PRECISION one, zero
113  parameter ( one = 1.0d+0, zero = 0.0d+0 )
114 * ..
115 * .. Local Scalars ..
116  INTEGER j
117  DOUBLE PRECISION anorm, eps, unfl, wnorm
118 * ..
119 * .. External Functions ..
120  DOUBLE PRECISION dasum, dlamch, dlange
121  EXTERNAL dasum, dlamch, dlange
122 * ..
123 * .. External Subroutines ..
124  EXTERNAL daxpy, dcopy
125 * ..
126 * .. Intrinsic Functions ..
127  INTRINSIC dble, max, min
128 * ..
129 * .. Executable Statements ..
130 *
131 * Quick return if possible
132 *
133  IF( m.LE.0 .OR. n.LE.0 ) THEN
134  result = zero
135  RETURN
136  END IF
137 *
138  unfl = dlamch( 'Safe minimum' )
139  eps = dlamch( 'Precision' )
140 *
141  wnorm = zero
142  DO 10 j = 1, n
143  CALL dcopy( m, a( 1, j ), 1, work, 1 )
144  CALL daxpy( m, -one, b( 1, j ), 1, work, 1 )
145  wnorm = max( wnorm, dasum( n, work, 1 ) )
146  10 CONTINUE
147 *
148  anorm = max( dlange( '1', m, n, a, lda, work ), unfl )
149 *
150  IF( anorm.GT.wnorm ) THEN
151  result = ( wnorm / anorm ) / ( m*eps )
152  ELSE
153  IF( anorm.LT.one ) THEN
154  result = ( min( wnorm, m*anorm ) / anorm ) / ( m*eps )
155  ELSE
156  result = min( wnorm / anorm, dble( m ) ) / ( m*eps )
157  END IF
158  END IF
159 *
160  RETURN
161 *
162 * End of DGET10
163 *
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
Definition: dcopy.f:53
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
Definition: daxpy.f:54
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:116
double precision function dasum(N, DX, INCX)
DASUM
Definition: dasum.f:53

Here is the call graph for this function:

Here is the caller graph for this function: