]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/test/float128/test_bessel_j.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / math / test / float128 / test_bessel_j.cpp
1 ///////////////////////////////////////////////////////////////
2 // Copyright Christopher Kormanyos 2002 - 2011.
3 // Copyright 2011 John Maddock. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
6 //
7 // This work is based on an earlier work:
8 // "Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations",
9 // in ACM TOMS, {VOL 37, ISSUE 4, (February 2011)} (C) ACM, 2011. http://doi.acm.org/10.1145/1916461.1916469
10
11 #include "setup.hpp"
12 #include "table_type.hpp"
13
14 #include <boost/math/special_functions/bessel.hpp>
15 #include "libs/math/test/test_bessel_j.hpp"
16
17 void expected_results()
18 {
19 //
20 // Define the max and mean errors expected for
21 // various compilers and platforms.
22 //
23
24 add_expected_result(
25 ".*", // compiler
26 ".*", // stdlib
27 ".*", // platform
28 ".*", // test type(s)
29 ".*J0.*Tricky.*", // test data group
30 ".*", 400000000, 400000000); // test function
31 add_expected_result(
32 ".*", // compiler
33 ".*", // stdlib
34 ".*", // platform
35 ".*", // test type(s)
36 ".*J1.*Tricky.*", // test data group
37 ".*", 10000000, 5000000); // test function
38 add_expected_result(
39 ".*", // compiler
40 ".*", // stdlib
41 ".*", // platform
42 ".*", // test type(s)
43 ".*JN.*Integer.*", // test data group
44 ".*", 50000, 15000); // test function
45 add_expected_result(
46 ".*", // compiler
47 ".*", // stdlib
48 ".*", // platform
49 ".*", // test type(s)
50 ".*(JN|j).*|.*Tricky.*", // test data group
51 ".*", 7000, 3000); // test function
52 add_expected_result(
53 ".*", // compiler
54 ".*", // stdlib
55 ".*", // platform
56 ".*", // test type(s)
57 ".*", // test data group
58 ".*", 40, 20); // test function
59 //
60 // Finish off by printing out the compiler/stdlib/platform names,
61 // we do this to make it easier to mark up expected error rates.
62 //
63 std::cout << "Tests run with " << BOOST_COMPILER << ", "
64 << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
65 }
66
67 template <class T>
68 void test(T t, const char* p)
69 {
70 test_bessel(t, p);
71 }
72
73
74 BOOST_AUTO_TEST_CASE( test_main )
75 {
76 expected_results();
77 ALL_TESTS
78 }
79
80
81