]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/multiprecision/test/math/test_bessel_y.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 https://www.boost.org/LICENSE_1_0.txt
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
12 #include "table_type.hpp"
14 #include <boost/math/special_functions/math_fwd.hpp>
15 #include "libs/math/test/test_bessel_y.hpp"
17 void expected_results()
20 // Define the max and mean errors expected for
21 // various compilers and platforms.
27 ".*mpfr_float_backend<18>.*", // test type(s)
28 ".*(Y[nv]|y).*Random.*", // test data group
29 ".*", 200000, 10000); // test function
34 ".*cpp_bin_float.*", // test type(s)
35 ".*(Y[nv]|y).*Random.*", // test data group
36 ".*", 2000000, 1000000); // test function
41 ".*mpfr_float_backend<0>.*", // test type(s)
42 ".*(Y[nv]|y).*Random.*", // test data group
43 ".*", 150000, 15000); // test function
49 ".*(Y[nv]|y).*Random.*", // test data group
50 ".*", 70000, 4000); // test function
55 ".*mpfr_float_backend<18>.*", // test type(s)
56 ".*Y0.*", // test data group
57 ".*", 3000, 2000); // test function
62 ".*cpp_bin_float.*", // test type(s)
63 ".*Y0.*", // test data group
64 ".*", 40000, 20000); // test function
70 ".*Y0.*", // test data group
71 ".*", 800, 400); // test function
76 ".*mpfr_float_backend<18>.*", // test type(s)
77 ".*Yn.*", // test data group
78 ".*", 400000, 70000); // test function
83 ".*cpp_bin_float.*", // test type(s)
84 ".*Yn.*", // test data group
85 ".*", 400000, 200000); // test function
91 ".*Yn.*", // test data group
92 ".*", 1700, 600); // test function
97 ".*mpfr_float_backend<18>.*", // test type(s)
98 ".*", // test data group
99 ".*", 15000, 4000); // test function
104 ".*cpp_bin_float.*", // test type(s)
105 ".*", // test data group
106 ".*", 50000, 20000); // test function
111 ".*", // test type(s)
112 ".*", // test data group
113 ".*", 150, 60); // test function
115 // Finish off by printing out the compiler/stdlib/platform names,
116 // we do this to make it easier to mark up expected error rates.
118 std::cout
<< "Tests run with " << BOOST_COMPILER
<< ", "
119 << BOOST_STDLIB
<< ", " << BOOST_PLATFORM
<< std::endl
;
123 void test(T t
, const char* p
)
128 BOOST_AUTO_TEST_CASE(test_main
)
130 using namespace boost::multiprecision
;
134 // 18 decimal digits: tests 80-bit long double approximations
135 // 30 decimal digits: tests 128-bit long double approximations
136 // 35 decimal digits: tests arbitrary precision code