aboutsummaryrefslogtreecommitdiff
path: root/TESTING
diff options
context:
space:
mode:
authorlangou <langou@users.noreply.github.com>2015-06-22 14:04:46 +0000
committerlangou <langou@users.noreply.github.com>2015-06-22 14:04:46 +0000
commit78d4e1705e62900a74b54445afbd8758461d2b04 (patch)
tree2b632f776cf1f9f8510056f58011062aa3529519 /TESTING
parentb5dddc30091de6879e08c46eb5256049cb98ce0f (diff)
Fix [CDSZ]QRT17.
This is a routine to test DGELS which solves solves full rank overdetermined ( linear least squares ) or underdetermined (minimum norm) linear systems. The check is, as follows, (1) If the system is consistent, (smallresidual,) we check that || A^T ( b – A * x ) || / (||A||*||b||*max(M,N,NRHS)*eps) is small (say less than 30). (2) If the system is not consistent, (large residual,) we check that || A^T ( b – A * x ) || / (||A||*|| b - A*x ||*max(M,N,NRHS)*eps) is small (say less than 30). DQRT17 was checking in the not consistent case (large residual) that || A^T ( b – A * x ) || / (||A||*||x||*max(M,N,NRHS)*eps) is small. It is a mistake and we need to change the ||x|| by a ||r||. This fix is consistent with what the documentation says and makes more sense.
Diffstat (limited to 'TESTING')
-rw-r--r--TESTING/LIN/cqrt17.f5
-rw-r--r--TESTING/LIN/dqrt17.f5
-rw-r--r--TESTING/LIN/sqrt17.f5
-rw-r--r--TESTING/LIN/zqrt17.f5
4 files changed, 8 insertions, 12 deletions
diff --git a/TESTING/LIN/cqrt17.f b/TESTING/LIN/cqrt17.f
index 623d7f06..a4109aab 100644
--- a/TESTING/LIN/cqrt17.f
+++ b/TESTING/LIN/cqrt17.f
@@ -249,9 +249,8 @@
IF( NORMB.NE.ZERO )
$ ERR = ERR / NORMB
ELSE
- NORMX = CLANGE( 'One-norm', NCOLS, NRHS, X, LDX, RWORK )
- IF( NORMX.NE.ZERO )
- $ ERR = ERR / NORMX
+ IF( NORMRS.NE.ZERO )
+ $ ERR = ERR / NORMRS
END IF
*
CQRT17 = ERR / ( SLAMCH( 'Epsilon' )*REAL( MAX( M, N, NRHS ) ) )
diff --git a/TESTING/LIN/dqrt17.f b/TESTING/LIN/dqrt17.f
index 625aba46..8637d82c 100644
--- a/TESTING/LIN/dqrt17.f
+++ b/TESTING/LIN/dqrt17.f
@@ -249,9 +249,8 @@
IF( NORMB.NE.ZERO )
$ ERR = ERR / NORMB
ELSE
- NORMX = DLANGE( 'One-norm', NCOLS, NRHS, X, LDX, RWORK )
- IF( NORMX.NE.ZERO )
- $ ERR = ERR / NORMX
+ IF( NORMRS.NE.ZERO )
+ $ ERR = ERR / NORMRS
END IF
*
DQRT17 = ERR / ( DLAMCH( 'Epsilon' )*DBLE( MAX( M, N, NRHS ) ) )
diff --git a/TESTING/LIN/sqrt17.f b/TESTING/LIN/sqrt17.f
index 720eb14d..d87bf16a 100644
--- a/TESTING/LIN/sqrt17.f
+++ b/TESTING/LIN/sqrt17.f
@@ -249,9 +249,8 @@
IF( NORMB.NE.ZERO )
$ ERR = ERR / NORMB
ELSE
- NORMX = SLANGE( 'One-norm', NCOLS, NRHS, X, LDX, RWORK )
- IF( NORMX.NE.ZERO )
- $ ERR = ERR / NORMX
+ IF( NORMRS.NE.ZERO )
+ $ ERR = ERR / NORMRS
END IF
*
SQRT17 = ERR / ( SLAMCH( 'Epsilon' )*REAL( MAX( M, N, NRHS ) ) )
diff --git a/TESTING/LIN/zqrt17.f b/TESTING/LIN/zqrt17.f
index 5e69ddd4..a1663cb8 100644
--- a/TESTING/LIN/zqrt17.f
+++ b/TESTING/LIN/zqrt17.f
@@ -250,9 +250,8 @@
IF( NORMB.NE.ZERO )
$ ERR = ERR / NORMB
ELSE
- NORMX = ZLANGE( 'One-norm', NCOLS, NRHS, X, LDX, RWORK )
- IF( NORMX.NE.ZERO )
- $ ERR = ERR / NORMX
+ IF( NORMRS.NE.ZERO )
+ $ ERR = ERR / NORMRS
END IF
*
ZQRT17 = ERR / ( DLAMCH( 'Epsilon' )*DBLE( MAX( M, N, NRHS ) ) )