// Copyright John Maddock 2006. // Copyright Paul A. Bristow 2007, 2009 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include #define BOOST_TEST_MAIN #include #include #include #include #include #include #include #include #include "functor.hpp" #include "handle_test_result.hpp" #include "table_type.hpp" #include #include #ifdef BOOST_MSVC #pragma warning(disable:4127) #endif template void do_test_1F1(const T& data, const char* type_name, const char* test_name) { typedef Real value_type; typedef value_type(*pg)(value_type, value_type, value_type); #if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) pg funcp = boost::math::log_hypergeometric_1F1; #else pg funcp = boost::math::log_hypergeometric_1F1; #endif boost::math::tools::test_result result; std::cout << "Testing " << test_name << " with type " << type_name << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; // // test hypergeometric_2F0 against data: // result = boost::math::tools::test_hetero( data, bind_func(funcp, 0, 1, 2), extract_result(3)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "log_hypergeometric_1F1", test_name); std::cout << std::endl; } #ifndef SC_ #define SC_(x) BOOST_MATH_BIG_CONSTANT(T, 1000000, x) #endif template void test_spots1(T, const char* type_name) { #include "hypergeometric_1f1_log_large.ipp" do_test_1F1(hypergeometric_1f1_log_large, type_name, "Large random values - log"); } template void test_spots2(T, const char* type_name) { #include "hypergeometric_1f1_log_large_unsolved.ipp" do_test_1F1(hypergeometric_1f1_log_large_unsolved, type_name, "Large random values - log - unsolved"); } template void test_spots(T z, const char* type_name) { test_spots1(z, type_name); #ifdef TEST_UNSOLVED test_spots2(z, type_name); #endif }