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_0F1.hpp"
8 #include <boost/multiprecision/cpp_bin_float.hpp>
9 #include <boost/multiprecision/cpp_dec_float.hpp>
11 void expected_results()
14 // Define the max and mean errors expected for
15 // various compilers and platforms.
17 const char* largest_type;
18 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
19 if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
21 largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40";
25 largest_type = "long double|real_concept|cpp_bin_float_quad|dec_40";
28 largest_type = "(long\\s+)?double|cpp_bin_float_quad|dec_40";
35 largest_type, // test type(s)
36 "Integer.*", // test data group
37 ".*", 300, 100); // test function
42 largest_type, // test type(s)
43 "Real.*", // test data group
44 ".*", 2000, 1000); // test function
50 largest_type, // test type(s)
51 "Large.*", // test data group
52 ".*", 400, 100); // test function
56 // Finish off by printing out the compiler/stdlib/platform names,
57 // we do this to make it easier to mark up expected error rates.
59 std::cout << "Tests run with " << BOOST_COMPILER << ", "
60 << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
63 BOOST_AUTO_TEST_CASE( test_main )
66 BOOST_MATH_CONTROL_FP;
68 #if !defined(TEST) || (TEST == 1)
69 #ifndef BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
70 test_spots(0.0F, "float");
72 test_spots(0.0, "double");
75 #if !defined(TEST) || (TEST == 2)
76 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
77 test_spots(0.0L, "long double");
78 #ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
79 test_spots(boost::math::concepts::real_concept(0.1), "real_concept");
83 #if !defined(TEST) || (TEST == 3)
84 test_spots(boost::multiprecision::cpp_bin_float_quad(), "cpp_bin_float_quad");
86 #if !defined(TEST) || (TEST == 4)
87 typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<40> > dec_40;
88 test_spots(dec_40(), "dec_40");