sf_jacobi_incl_test.cpp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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/bessel.hpp>
  7. // #includes all the files that it needs to.
  8. //
  9. #include <boost/math/special_functions/jacobi_elliptic.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::jacobi_elliptic<float>(f, f, static_cast<float*>(0), static_cast<float*>(0)));
  18. check_result<double>(boost::math::jacobi_elliptic<double>(d, d, static_cast<double*>(0), static_cast<double*>(0)));
  19. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  20. check_result<long double>(boost::math::jacobi_elliptic<long double>(l, l, static_cast<long double*>(0), static_cast<long double*>(0)));
  21. #endif
  22. check_result<float>(boost::math::jacobi_sn<float>(f, f));
  23. check_result<double>(boost::math::jacobi_sn<double>(d, d));
  24. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  25. check_result<long double>(boost::math::jacobi_sn<long double>(l, l));
  26. #endif
  27. check_result<float>(boost::math::jacobi_cn<float>(f, f));
  28. check_result<double>(boost::math::jacobi_cn<double>(d, d));
  29. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  30. check_result<long double>(boost::math::jacobi_cn<long double>(l, l));
  31. #endif
  32. check_result<float>(boost::math::jacobi_dn<float>(f, f));
  33. check_result<double>(boost::math::jacobi_dn<double>(d, d));
  34. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  35. check_result<long double>(boost::math::jacobi_dn<long double>(l, l));
  36. #endif
  37. check_result<float>(boost::math::jacobi_cd<float>(f, f));
  38. check_result<double>(boost::math::jacobi_cd<double>(d, d));
  39. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  40. check_result<long double>(boost::math::jacobi_cd<long double>(l, l));
  41. #endif
  42. check_result<float>(boost::math::jacobi_dc<float>(f, f));
  43. check_result<double>(boost::math::jacobi_dc<double>(d, d));
  44. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  45. check_result<long double>(boost::math::jacobi_dc<long double>(l, l));
  46. #endif
  47. check_result<float>(boost::math::jacobi_ns<float>(f, f));
  48. check_result<double>(boost::math::jacobi_ns<double>(d, d));
  49. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  50. check_result<long double>(boost::math::jacobi_ns<long double>(l, l));
  51. #endif
  52. check_result<float>(boost::math::jacobi_sd<float>(f, f));
  53. check_result<double>(boost::math::jacobi_sd<double>(d, d));
  54. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  55. check_result<long double>(boost::math::jacobi_sd<long double>(l, l));
  56. #endif
  57. check_result<float>(boost::math::jacobi_ds<float>(f, f));
  58. check_result<double>(boost::math::jacobi_ds<double>(d, d));
  59. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  60. check_result<long double>(boost::math::jacobi_ds<long double>(l, l));
  61. #endif
  62. check_result<float>(boost::math::jacobi_nc<float>(f, f));
  63. check_result<double>(boost::math::jacobi_nc<double>(d, d));
  64. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  65. check_result<long double>(boost::math::jacobi_nc<long double>(l, l));
  66. #endif
  67. check_result<float>(boost::math::jacobi_nd<float>(f, f));
  68. check_result<double>(boost::math::jacobi_nd<double>(d, d));
  69. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  70. check_result<long double>(boost::math::jacobi_nd<long double>(l, l));
  71. #endif
  72. check_result<float>(boost::math::jacobi_sc<float>(f, f));
  73. check_result<double>(boost::math::jacobi_sc<double>(d, d));
  74. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  75. check_result<long double>(boost::math::jacobi_sc<long double>(l, l));
  76. #endif
  77. check_result<float>(boost::math::jacobi_cs<float>(f, f));
  78. check_result<double>(boost::math::jacobi_cs<double>(d, d));
  79. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  80. check_result<long double>(boost::math::jacobi_cs<long double>(l, l));
  81. #endif
  82. }