1 // Copyright John Maddock 2006-15.
2 // Copyright Paul A. Bristow 2007
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #include "bindings.hpp"
8 #include "../../test/test_igamma_inv.hpp"
9 #include <boost/math/special_functions/gamma.hpp>
11 BOOST_AUTO_TEST_CASE(test_main
)
13 BOOST_MATH_CONTROL_FP
;
15 error_stream_replacer rep
;
19 test_gamma(static_cast<TYPE_TO_TEST
>(0), NAME_OF_TYPE_TO_TEST
);
22 bool test_float
= false;
23 bool test_double
= false;
24 bool test_long_double
= false;
26 if(std::numeric_limits
<long double>::digits
== std::numeric_limits
<double>::digits
)
29 // Don't bother with long double, it's the same as double:
31 if(BOOST_MATH_PROMOTE_FLOAT_POLICY
== false)
37 if(BOOST_MATH_PROMOTE_FLOAT_POLICY
== false)
39 if(BOOST_MATH_PROMOTE_DOUBLE_POLICY
== false)
41 test_long_double
= true;
44 #ifdef ALWAYS_TEST_DOUBLE
49 test_gamma(0.0f
, "float");
51 test_gamma(0.0, "double");
53 test_gamma(0.0L, "long double");
54 #ifdef BOOST_MATH_USE_FLOAT128
55 //test_gamma(0.0Q, "__float128");