]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/reporting/accuracy/test_gamma.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / math / reporting / accuracy / test_gamma.cpp
CommitLineData
7c673cae
FG
1// Copyright John Maddock 2015.
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)
5
6#ifdef _MSC_VER
7# pragma warning (disable : 4224)
8#endif
9
10#include <boost/math/special_functions/gamma.hpp>
11#include "bindings.hpp"
12#include "../../test/test_gamma.hpp"
13
14BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
15
16BOOST_AUTO_TEST_CASE(test_main)
17{
18 BOOST_MATH_CONTROL_FP;
19
20 error_stream_replacer rep;
21
22#ifdef TYPE_TO_TEST
23
24 test_gamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
25
26#else
27 bool test_float = false;
28 bool test_double = false;
29 bool test_long_double = false;
30
31 if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
32 {
33 //
34 // Don't bother with long double, it's the same as double:
35 //
36 if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
37 test_float = true;
38 test_double = true;
39 }
40 else
41 {
42 if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
43 test_float = true;
44 if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
45 test_double = true;
46 test_long_double = true;
47 }
48
49#ifdef ALWAYS_TEST_DOUBLE
50 test_double = true;
51#endif
52
53 if(test_float)
54 test_gamma(0.0f, "float");
55 if(test_double)
56 test_gamma(0.0, "double");
57 if(test_long_double)
58 test_gamma(0.0L, "long double");
59#ifdef BOOST_MATH_USE_FLOAT128
60 //test_cbrt(0.0Q, "__float128");
61#endif
62
63
64#endif
65}
66