test_zeta_hooks.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // (C) 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. #ifndef BOOST_MATH_TEST_ZETA_OTHER_HOOKS_HPP
  6. #define BOOST_MATH_TEST_ZETA_OTHER_HOOKS_HPP
  7. #ifdef TEST_CEPHES
  8. namespace other{
  9. extern "C" {
  10. double zetac(double);
  11. float zetacf(float);
  12. long double zetacl(long double);
  13. }
  14. inline float zeta(float a)
  15. { return 1 + zetac(a); }
  16. inline double zeta(double a)
  17. { return 1 + zetac(a); }
  18. inline long double zeta(long double a)
  19. {
  20. #ifdef BOOST_MSVC
  21. return 1 + zetac((double)a);
  22. #else
  23. return zetacl(a);
  24. #endif
  25. }
  26. }
  27. #define TEST_OTHER
  28. #endif
  29. #ifdef TEST_GSL
  30. #include <gsl/gsl_sf_zeta.h>
  31. namespace other{
  32. inline float zeta(float a)
  33. { return (float)gsl_sf_zeta(a); }
  34. inline double zeta(double a)
  35. { return gsl_sf_zeta(a); }
  36. inline long double zeta(long double a)
  37. { return gsl_sf_zeta(a); }
  38. }
  39. #define TEST_OTHER
  40. #endif
  41. #ifdef TEST_OTHER
  42. namespace other{
  43. boost::math::concepts::real_concept zeta(boost::math::concepts::real_concept){ return 0; }
  44. }
  45. #endif
  46. #endif