diff options
Diffstat (limited to 'libs/math/test/float128')
-rw-r--r-- | libs/math/test/float128/test_carlson.cpp | 1 | ||||
-rw-r--r-- | libs/math/test/float128/test_digamma.cpp | 9 | ||||
-rw-r--r-- | libs/math/test/float128/test_ellint_3.cpp | 7 | ||||
-rw-r--r-- | libs/math/test/float128/test_polygamma.cpp | 51 | ||||
-rw-r--r-- | libs/math/test/float128/test_trigamma.cpp | 44 |
5 files changed, 111 insertions, 1 deletions
diff --git a/libs/math/test/float128/test_carlson.cpp b/libs/math/test/float128/test_carlson.cpp index ec6699daa..145849373 100644 --- a/libs/math/test/float128/test_carlson.cpp +++ b/libs/math/test/float128/test_carlson.cpp @@ -10,6 +10,7 @@ #include <boost/math/special_functions/ellint_rd.hpp> #include <boost/math/special_functions/ellint_rf.hpp> #include <boost/math/special_functions/ellint_rj.hpp> +#include <boost/math/special_functions/ellint_rg.hpp> #include "libs/math/test/test_carlson.hpp" void expected_results() diff --git a/libs/math/test/float128/test_digamma.cpp b/libs/math/test/float128/test_digamma.cpp index 7981c6367..9856223be 100644 --- a/libs/math/test/float128/test_digamma.cpp +++ b/libs/math/test/float128/test_digamma.cpp @@ -20,8 +20,15 @@ void expected_results() ".*", // stdlib ".*", // platform ".*", // test type(s) + ".*negative.*", // test data group + ".*", 400, 200); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) ".*", // test data group - ".*", 350, 100); // test function + ".*", 2, 2); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. diff --git a/libs/math/test/float128/test_ellint_3.cpp b/libs/math/test/float128/test_ellint_3.cpp index 2507ac694..e46268388 100644 --- a/libs/math/test/float128/test_ellint_3.cpp +++ b/libs/math/test/float128/test_ellint_3.cpp @@ -27,6 +27,13 @@ void expected_results() ".*", // stdlib ".*", // platform ".*", // test type(s) + ".*Mathworld.*", // test data group + ".*", 600, 200); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) ".*", // test data group ".*", 60, 30); // test function // diff --git a/libs/math/test/float128/test_polygamma.cpp b/libs/math/test/float128/test_polygamma.cpp new file mode 100644 index 000000000..ebd897af1 --- /dev/null +++ b/libs/math/test/float128/test_polygamma.cpp @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////// +// Copyright 2011 John Maddock. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_ + +#include "setup.hpp" +#include "table_type.hpp" + +#include <boost/math/special_functions/polygamma.hpp> +#include "libs/math/test/test_polygamma.hpp" + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*bug cases.*", // test data group + ".*", 100000, 40000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*", // test data group + ".*", 500, 200); // test function + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +template <class T> +void test(T t, const char* p) +{ + test_polygamma(t, p); +} + +BOOST_AUTO_TEST_CASE( test_main ) +{ + expected_results(); + ALL_TESTS +} + diff --git a/libs/math/test/float128/test_trigamma.cpp b/libs/math/test/float128/test_trigamma.cpp new file mode 100644 index 000000000..8862b53d0 --- /dev/null +++ b/libs/math/test/float128/test_trigamma.cpp @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////// +// Copyright 2011 John Maddock. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_ + +#include "setup.hpp" +#include "table_type.hpp" + +#include <boost/math/special_functions/trigamma.hpp> +#include "libs/math/test/test_trigamma.hpp" + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*", // test data group + ".*", 2, 2); // test function + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +template <class T> +void test(T t, const char* p) +{ + test_trigamma(t, p); +} + +BOOST_AUTO_TEST_CASE( test_main ) +{ + expected_results(); + ALL_TESTS +} + |