From 4a2eb67b4397f6554e23e1ece4f069852dde743e Mon Sep 17 00:00:00 2001 From: Drew Parsons Date: Sat, 16 Oct 2021 10:46:27 +0200 Subject: [PATCH 1/2] relax tolerance in the xlapack.solveCholesky test The xlapack.solveCholesky test in test_lapack.cpp fails on 32-bit architectures (i386/i686): [ RUN ] xlapack.solveCholesky /tmp/autopkgtest-lxc.gg3nslld/downtmp/autopkgtest_tmp/test_lapack.cpp:166: Failure Expected equality of these values: x_expected[i] Which is: 0.13757507429403265 x[i] Which is: 0.13757507429403248 [ FAILED ] xlapack.solveCholesky (0 ms) This patch relaxes test tolerance by using EXPECT_NEAR with abstol=2e-16 instead of EXPECT_DOUBLE_EQ. Fixes Issue #211. --- test/test_lapack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_lapack.cpp b/test/test_lapack.cpp index 9fcea5a..a1b1a25 100644 --- a/test/test_lapack.cpp +++ b/test/test_lapack.cpp @@ -163,7 +163,7 @@ namespace xt -1.3449222878385465 , -1.81183493755905478}; for (int i = 0; i < x_expected.shape()[0]; ++i) { - EXPECT_DOUBLE_EQ(x_expected[i], x[i]); + EXPECT_NEAR(x_expected[i], x[i], 2e-16); } } From fd24ac0a5c4b1b93eea38753a4f7fb23c2e03df3 Mon Sep 17 00:00:00 2001 From: Drew Parsons Date: Sat, 16 Oct 2021 10:57:12 +0200 Subject: [PATCH 2/2] relax solveCholesky test tolerance further (for armhf) The armhf discrepancy is coarser, 0.13757507429403265 - 0.13757507429403243 = 2.220446049250313e-16 So relax test tolerance to 5e-16. --- test/test_lapack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_lapack.cpp b/test/test_lapack.cpp index a1b1a25..47a0b6d 100644 --- a/test/test_lapack.cpp +++ b/test/test_lapack.cpp @@ -163,7 +163,7 @@ namespace xt -1.3449222878385465 , -1.81183493755905478}; for (int i = 0; i < x_expected.shape()[0]; ++i) { - EXPECT_NEAR(x_expected[i], x[i], 2e-16); + EXPECT_NEAR(x_expected[i], x[i], 5e-16); } }