From e8386a32c1e50a09c90a9d1b986c1319a5b61ef5 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 16 Oct 2013 11:35:47 +0200 Subject: [PATCH] changed: run test for a x different than pi this to workaround roundoff differences occuring near sin(pi) on different compilers/hardware --- tests/test_syntax.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_syntax.cpp b/tests/test_syntax.cpp index e8d5bc044..22f77cc92 100644 --- a/tests/test_syntax.cpp +++ b/tests/test_syntax.cpp @@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE(Cosine) const double atol = 1.0e-14; - const AdFW x = AdFW::variable(3.14159265358979323846264338327950288); + const AdFW x = AdFW::variable(3.14159265358979323846264338327950288/3.0); const AdFW f = std::cos(x); BOOST_CHECK_CLOSE(f.val(), std::cos(x.val()), atol);