From 2b1cf12bf36e536cd29994951b46f180e81e1179 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 18 Feb 2019 22:50:16 +0100 Subject: Fix a few issues with i386 builds Relax tolerances in a few unit test, and in laea code. Seen with gcc 5.3 and also 7.1 Related to the use of the 387 floating-point math, since they disappear with gcc 7.1 if using non-default -mfpmath=sse -msse --- test/unit/pj_phi2_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/unit/pj_phi2_test.cpp') diff --git a/test/unit/pj_phi2_test.cpp b/test/unit/pj_phi2_test.cpp index 5fc84600..c4db6e52 100644 --- a/test/unit/pj_phi2_test.cpp +++ b/test/unit/pj_phi2_test.cpp @@ -41,12 +41,12 @@ TEST(PjPhi2Test, Basic) { EXPECT_DOUBLE_EQ(M_PI_2, pj_phi2(ctx, 0.0, 0.0)); - EXPECT_DOUBLE_EQ(0.0, pj_phi2(ctx, 1.0, 0.0)); + EXPECT_NEAR(0.0, pj_phi2(ctx, 1.0, 0.0), 1e-16); EXPECT_DOUBLE_EQ(M_PI_2, pj_phi2(ctx, 0.0, 1.0)); EXPECT_DOUBLE_EQ(M_PI, pj_phi2(ctx, -1.0, 0.0)); EXPECT_DOUBLE_EQ(M_PI_2, pj_phi2(ctx, 0.0, -1.0)); - EXPECT_DOUBLE_EQ(0.0, pj_phi2(ctx, 1.0, 1.0)); + EXPECT_NEAR(0.0, pj_phi2(ctx, 1.0, 1.0), 1e-16); EXPECT_DOUBLE_EQ(M_PI, pj_phi2(ctx, -1.0, -1.0)); // TODO(schwehr): M_PI_4, M_PI_2, M_PI, M_E -- cgit v1.2.3