1 // Copyright John Maddock 2006.
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 // Basic sanity check that header <boost/math/special_functions/gamma.hpp>
7 // #includes all the files that it needs to.
8 //
9 #include <boost/math/special_functions/gamma.hpp>
10 //
11 // Note this header includes no other headers, this is
12 // important if this test is to be meaningful:
13 //
14 #include "test_compile_result.hpp"
15
compile_and_link_test()16 void compile_and_link_test()
17 {
18 check_result<float>(boost::math::tgamma<float>(f));
19 check_result<double>(boost::math::tgamma<double>(d));
20 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
21 check_result<long double>(boost::math::tgamma<long double>(l));
22 #endif
23
24 check_result<float>(boost::math::lgamma<float>(f));
25 check_result<double>(boost::math::lgamma<double>(d));
26 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
27 check_result<long double>(boost::math::lgamma<long double>(l));
28 #endif
29
30 check_result<float>(boost::math::gamma_p<float>(f, f));
31 check_result<double>(boost::math::gamma_p<double>(d, d));
32 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
33 check_result<long double>(boost::math::gamma_p<long double>(l, l));
34 #endif
35
36 check_result<float>(boost::math::gamma_q<float>(f, f));
37 check_result<double>(boost::math::gamma_q<double>(d, d));
38 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
39 check_result<long double>(boost::math::gamma_q<long double>(l, l));
40 #endif
41
42 check_result<float>(boost::math::gamma_p_inv<float>(f, f));
43 check_result<double>(boost::math::gamma_p_inv<double>(d, d));
44 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
45 check_result<long double>(boost::math::gamma_p_inv<long double>(l, l));
46 #endif
47
48 check_result<float>(boost::math::gamma_q_inv<float>(f, f));
49 check_result<double>(boost::math::gamma_q_inv<double>(d, d));
50 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
51 check_result<long double>(boost::math::gamma_q_inv<long double>(l, l));
52 #endif
53
54 check_result<float>(boost::math::gamma_p_inva<float>(f, f));
55 check_result<double>(boost::math::gamma_p_inva<double>(d, d));
56 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
57 check_result<long double>(boost::math::gamma_p_inva<long double>(l, l));
58 #endif
59
60 check_result<float>(boost::math::gamma_q_inva<float>(f, f));
61 check_result<double>(boost::math::gamma_q_inva<double>(d, d));
62 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
63 check_result<long double>(boost::math::gamma_q_inva<long double>(l, l));
64 #endif
65
66 check_result<float>(boost::math::gamma_p_derivative<float>(f, f));
67 check_result<double>(boost::math::gamma_p_derivative<double>(d, d));
68 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
69 check_result<long double>(boost::math::gamma_p_derivative<long double>(l, l));
70 #endif
71
72 check_result<float>(boost::math::tgamma_ratio<float>(f, f));
73 check_result<double>(boost::math::tgamma_ratio<double>(d, d));
74 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
75 check_result<long double>(boost::math::tgamma_ratio<long double>(l, l));
76 #endif
77
78 check_result<float>(boost::math::tgamma_delta_ratio<float>(f, f));
79 check_result<double>(boost::math::tgamma_delta_ratio<double>(d, d));
80 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
81 check_result<long double>(boost::math::tgamma_delta_ratio<long double>(l, l));
82 #endif
83 }
84