diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-02-18 22:50:16 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-02-18 22:50:16 +0100 |
| commit | 2b1cf12bf36e536cd29994951b46f180e81e1179 (patch) | |
| tree | 9e49a7b998f27b5a11bff304461baa836212420a /test/unit/pj_phi2_test.cpp | |
| parent | 97016c7f7b74bd473c446ee128d1774209eddfc0 (diff) | |
| download | PROJ-2b1cf12bf36e536cd29994951b46f180e81e1179.tar.gz PROJ-2b1cf12bf36e536cd29994951b46f180e81e1179.zip | |
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
Diffstat (limited to 'test/unit/pj_phi2_test.cpp')
| -rw-r--r-- | test/unit/pj_phi2_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
