1 // (C) Copyright John Maddock 2006.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include "test_1F1_regularized.hpp"
8 #include <boost/multiprecision/cpp_bin_float.hpp>
10 void expected_results()
13 // Define the max and mean errors expected for
14 // various compilers and platforms.
16 const char* largest_type;
17 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
18 if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
20 largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40|cpp_bin_float_double_extended";
24 largest_type = "long double|real_concept|cpp_bin_float_quad|dec_40|cpp_bin_float_double_extended";
27 largest_type = "(long\\s+)?double";
34 "cpp_bin_float_quad|cpp_bin_float_double_extended", // test type(s)
35 "Integer a values", // test data group
36 ".*", 25000, 800); // test function
41 "cpp_bin_float_quad|cpp_bin_float_double_extended", // test type(s)
42 "Large.*", // test data group
43 ".*", 500000, 20000); // test function
48 "cpp_bin_float_quad|cpp_bin_float_double_extended", // test type(s)
49 "Small.*", // test data group
50 ".*", 2000, 200); // test function
56 "dec_40", // test type(s)
57 "Integer a values", // test data group
58 ".*", 12000, 800); // test function
63 "dec_40", // test type(s)
64 "Large.*", // test data group
65 ".*", 200000000L, 20000000L); // test function
70 "dec_40", // test type(s)
71 "Small.*", // test data group
72 ".*", 1000, 300); // test function
74 #if (LDBL_MANT_DIG < DBL_MANT_DIG * 2) && (LDBL_MANT_DIG != DBL_MANT_DIG)
76 // long double has only a little extra precision and errors may creep
77 // into the double results:
83 "double", // test type(s)
84 "Integer a values", // test data group
85 ".*", 5, 3); // test function
91 "double", // test type(s)
92 "Small.*", // test data group
93 ".*", 5, 3); // test function
99 "double", // test type(s)
100 "Large.*", // test data group
101 ".*", 100, 20); // test function
106 "double", // test type(s)
107 "Bug.*", // test data group
108 ".*", 300, 50); // test function
116 largest_type, // test type(s)
117 "Integer a values", // test data group
118 ".*", 16000, 600); // test function
124 largest_type, // test type(s)
125 "Small.*", // test data group
126 ".*", 2000, 200); // test function
132 largest_type, // test type(s)
133 "Large.*", // test data group
134 ".*", 400000, 8000); // test function
139 "dec_40", // test type(s)
140 "Bug cases.*", // test data group
141 ".*", 2200000, 400000); // test function
146 largest_type, // test type(s)
147 "Bug cases.*", // test data group
148 ".*", 1500000, 400000); // test function
151 // Finish off by printing out the compiler/stdlib/platform names,
152 // we do this to make it easier to mark up expected error rates.
154 std::cout << "Tests run with " << BOOST_COMPILER << ", "
155 << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
158 BOOST_AUTO_TEST_CASE( test_main )
161 BOOST_MATH_CONTROL_FP;
163 #if !defined(TEST) || (TEST == 1)
164 test_hypergeometric_mellin_transform<double>();
165 test_hypergeometric_laplace_transform<double>();
168 #ifndef BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
169 #if !defined(TEST) || (TEST == 2)
170 test_spots(0.0F, "float");
173 #if !defined(TEST) || (TEST == 3)
174 test_spots(0.0, "double");
176 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
177 #if (!defined(TEST) || (TEST == 4)) && (DBL_MAX_EXP != LDBL_MAX_EXP)
178 test_spots(0.0L, "long double");
180 #ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
181 #if !defined(TEST) || (TEST == 5)
182 test_spots(boost::math::concepts::real_concept(0.1), "real_concept");
186 #if !defined(TEST) || (TEST == 6)
187 test_spots(boost::multiprecision::cpp_bin_float_quad(), "cpp_bin_float_quad");
189 #if !defined(TEST) || (TEST == 7)
190 typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<40> > dec_40;
191 test_spots(dec_40(), "dec_40");