sf_bernoulli_incl_test.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright John Maddock 2012.
  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/bernoulli.hpp>
  7. // #includes all the files that it needs to.
  8. //
  9. #include <ostream>
  10. #include <boost/math/special_functions/bernoulli.hpp>
  11. //
  12. // Note this header includes no other headers, this is
  13. // important if this test is to be meaningful:
  14. //
  15. #include "test_compile_result.hpp"
  16. void compile_and_link_test()
  17. {
  18. check_result<float>(boost::math::bernoulli_b2n<float>(i));
  19. check_result<double>(boost::math::bernoulli_b2n<double>(i));
  20. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  21. check_result<long double>(boost::math::bernoulli_b2n<long double>(i));
  22. #endif
  23. check_result<float>(boost::math::tangent_t2n<float>(i));
  24. check_result<double>(boost::math::tangent_t2n<double>(i));
  25. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  26. check_result<long double>(boost::math::tangent_t2n<long double>(i));
  27. #endif
  28. #ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
  29. constexpr float ce_f = boost::math::unchecked_bernoulli_b2n<float>(2);
  30. constexpr float ce_d = boost::math::unchecked_bernoulli_b2n<double>(2);
  31. constexpr float ce_l = boost::math::unchecked_bernoulli_b2n<long double>(2);
  32. std::ostream cnull(0);
  33. cnull << ce_f << ce_d << ce_l << std::endl;
  34. #endif
  35. }