aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/lu.cpp
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2016-04-01 11:58:17 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2016-04-01 11:58:17 -0700
commit91414e0042779b1b9d312d9255f389e67aa38106 (patch)
tree7ad8bd061a431e5e66e17ea8d7c87b2872bfe3f6 /test/lu.cpp
parent1aa89fb85548dc425d54d2cbe7f28915c29db13a (diff)
Fix comments in ConditionEstimator and minor cleanup.
Diffstat (limited to 'test/lu.cpp')
-rw-r--r--test/lu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lu.cpp b/test/lu.cpp
index 31991520d..9e8059f58 100644
--- a/test/lu.cpp
+++ b/test/lu.cpp
@@ -152,7 +152,7 @@ template<typename MatrixType> void lu_invertible()
VERIFY_IS_APPROX(m2, m1_inverse*m3);
// Test condition number estimation.
- RealScalar rcond = RealScalar(1) / matrix_l1_norm(m1) / matrix_l1_norm(m1_inverse);
+ RealScalar rcond = (RealScalar(1) / matrix_l1_norm(m1)) / matrix_l1_norm(m1_inverse);
// Verify that the estimate is within a factor of 10 of the truth.
VERIFY(lu.rcond() > rcond / 10 && lu.rcond() < rcond * 10);
@@ -197,7 +197,7 @@ template<typename MatrixType> void lu_partial_piv()
VERIFY_IS_APPROX(m2, m1_inverse*m3);
// Test condition number estimation.
- RealScalar rcond = RealScalar(1) / matrix_l1_norm(m1) / matrix_l1_norm(m1_inverse);
+ RealScalar rcond = (RealScalar(1) / matrix_l1_norm(m1)) / matrix_l1_norm(m1_inverse);
// Verify that the estimate is within a factor of 10 of the truth.
VERIFY(plu.rcond() > rcond / 10 && plu.rcond() < rcond * 10);