LAPACK  3.10.1 LAPACK: Linear Algebra PACKage

## ◆ dget10()

 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 )```

Definition at line 92 of file dget10.f.

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