Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / math / test / float128 / test_ibeta_inv_ab_4.cpp
1 ///////////////////////////////////////////////////////////////
2 //  Copyright 2011 John Maddock. Distributed under the Boost
3 //  Software License, Version 1.0. (See accompanying file
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
5
6 #include "setup.hpp"
7 #include "table_type.hpp"
8 #define TEST_UDT
9
10 #define TEST_DATA 4
11 #define FULL_TEST
12
13 #include <boost/math/special_functions/beta.hpp>
14 #include "libs/math/test/test_ibeta_inv_ab.hpp"
15
16 void expected_results()
17 {
18    //
19    // Define the max and mean errors expected for
20    // various compilers and platforms.
21    //
22    add_expected_result(
23       ".*",                          // compiler
24       ".*",                          // stdlib
25       ".*",                          // platform
26       ".*",                          // test type(s)
27       ".*",                          // test data group
28       ".*", 10000, 1000);              // test function
29    //
30    // Finish off by printing out the compiler/stdlib/platform names,
31    // we do this to make it easier to mark up expected error rates.
32    //
33    std::cout << "Tests run with " << BOOST_COMPILER << ", "
34       << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
35 }
36
37 template <class T>
38 void test(T t, const char* p)
39 {
40    test_beta(t, p);
41 }
42
43 BOOST_AUTO_TEST_CASE( test_main )
44 {
45    expected_results();
46    //
47    // Test at:
48    // 18 decimal digits: tests 80-bit long double approximations
49    // 30 decimal digits: tests 128-bit long double approximations
50    // 35 decimal digits: tests arbitrary precision code
51    //
52    ALL_TESTS
53 }
54