sf_bessel_incl_test.cpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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/bessel.hpp>
  7. // #includes all the files that it needs to.
  8. //
  9. #include <boost/math/special_functions/bessel.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. void compile_and_link_test()
  16. {
  17. check_result<float>(boost::math::cyl_bessel_j<float>(f, f));
  18. check_result<double>(boost::math::cyl_bessel_j<double>(d, d));
  19. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  20. check_result<long double>(boost::math::cyl_bessel_j<long double>(l, l));
  21. #endif
  22. check_result<float>(boost::math::cyl_neumann<float>(f, f));
  23. check_result<double>(boost::math::cyl_neumann<double>(d, d));
  24. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  25. check_result<long double>(boost::math::cyl_neumann<long double>(l, l));
  26. #endif
  27. check_result<float>(boost::math::cyl_bessel_i<float>(f, f));
  28. check_result<double>(boost::math::cyl_bessel_i<double>(d, d));
  29. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  30. check_result<long double>(boost::math::cyl_bessel_i<long double>(l, l));
  31. #endif
  32. check_result<float>(boost::math::cyl_bessel_k<float>(f, f));
  33. check_result<double>(boost::math::cyl_bessel_k<double>(d, d));
  34. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  35. check_result<long double>(boost::math::cyl_bessel_k<long double>(l, l));
  36. #endif
  37. check_result<float>(boost::math::sph_bessel<float>(u, f));
  38. check_result<double>(boost::math::sph_bessel<double>(u, d));
  39. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  40. check_result<long double>(boost::math::sph_bessel<long double>(u, l));
  41. #endif
  42. check_result<float>(boost::math::sph_neumann<float>(u, f));
  43. check_result<double>(boost::math::sph_neumann<double>(u, d));
  44. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  45. check_result<long double>(boost::math::sph_neumann<long double>(u, l));
  46. #endif
  47. }