From 453c5132e13e9b67b70688633ad74da5e34b5f5a Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 6 Sep 2012 18:01:54 +0000 Subject: [PATCH] Adjusted test tolerance to pass on 32-bit systems --- gtsam/base/tests/testCholesky.cpp | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/gtsam/base/tests/testCholesky.cpp b/gtsam/base/tests/testCholesky.cpp index 55c72543e..8e8da7a70 100644 --- a/gtsam/base/tests/testCholesky.cpp +++ b/gtsam/base/tests/testCholesky.cpp @@ -81,38 +81,38 @@ TEST(cholesky, BadScalingSVD) { double expectedCondition = 1e40; double actualCondition = S(0) / S(1); - DOUBLES_EQUAL(expectedCondition, actualCondition, 1e-41); + DOUBLES_EQUAL(expectedCondition, actualCondition, 1e30); } /* ************************************************************************* */ TEST(cholesky, underconstrained) { Matrix L(6,6); L << - 1, 0, 0, 0, 0, 0, - 1.11177808157954, 1.06204809504665, 0.507342638873381, 1.34953401829486, 1, 0, - 0.155864888199928, 1.10933048588373, 0.501255576961674, 1, 0, 0, - 1.12108665967793, 1.01584408366945, 1, 0, 0, 0, - 0.776164062474843, 0.117617236580373, -0.0236628691347294, 0.814118199972143, 0.694309975328922, 1, + 1, 0, 0, 0, 0, 0, + 1.11177808157954, 1.06204809504665, 0.507342638873381, 1.34953401829486, 1, 0, + 0.155864888199928, 1.10933048588373, 0.501255576961674, 1, 0, 0, + 1.12108665967793, 1.01584408366945, 1, 0, 0, 0, + 0.776164062474843, 0.117617236580373, -0.0236628691347294, 0.814118199972143, 0.694309975328922, 1, 0.1197220685104, 1, 0, 0, 0, 0; Matrix D1(6,6); D1 << - 0.814723686393179, 0, 0, 0, 0, 0, - 0, 0.811780089277421, 0, 0, 0, 0, - 0, 0, 1.82596950680844, 0, 0, 0, - 0, 0, 0, 0.240287537694585, 0, 0, - 0, 0, 0, 0, 1.34342584865901, 0, + 0.814723686393179, 0, 0, 0, 0, 0, + 0, 0.811780089277421, 0, 0, 0, 0, + 0, 0, 1.82596950680844, 0, 0, 0, + 0, 0, 0, 0.240287537694585, 0, 0, + 0, 0, 0, 0, 1.34342584865901, 0, 0, 0, 0, 0, 0, 1e-12; Matrix D2(6,6); D2 << - 0.814723686393179, 0, 0, 0, 0, 0, - 0, 0.811780089277421, 0, 0, 0, 0, - 0, 0, 1.82596950680844, 0, 0, 0, - 0, 0, 0, 0.240287537694585, 0, 0, - 0, 0, 0, 0, 0, 0, + 0.814723686393179, 0, 0, 0, 0, 0, + 0, 0.811780089277421, 0, 0, 0, 0, + 0, 0, 1.82596950680844, 0, 0, 0, + 0, 0, 0, 0.240287537694585, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; Matrix D3(6,6); D3 << - 0.814723686393179, 0, 0, 0, 0, 0, - 0, 0.811780089277421, 0, 0, 0, 0, - 0, 0, 1.82596950680844, 0, 0, 0, - 0, 0, 0, 0.240287537694585, 0, 0, - 0, 0, 0, 0, -0.5, 0, + 0.814723686393179, 0, 0, 0, 0, 0, + 0, 0.811780089277421, 0, 0, 0, 0, + 0, 0, 1.82596950680844, 0, 0, 0, + 0, 0, 0, 0.240287537694585, 0, 0, + 0, 0, 0, 0, -0.5, 0, 0, 0, 0, 0, 0, -0.6; Matrix A1 = L * D1 * L.transpose();