big_lanczos.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright (c) 2011 John Maddock
  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_MP_BIG_LANCZOS
  6. #define BOOST_MP_BIG_LANCZOS
  7. #include <boost/math/bindings/detail/big_lanczos.hpp>
  8. namespace boost{ namespace math{
  9. namespace lanczos{
  10. template <class T, class Policy>
  11. struct lanczos;
  12. template<class Backend, boost::multiprecision::expression_template_option ExpressionTemplates, class Policy>
  13. struct lanczos<multiprecision::number<Backend, ExpressionTemplates>, Policy>
  14. {
  15. typedef typename boost::math::policies::precision<multiprecision::number<Backend, ExpressionTemplates>, Policy>::type precision_type;
  16. typedef typename mpl::if_c<
  17. precision_type::value <= 73,
  18. lanczos13UDT,
  19. typename mpl::if_c<
  20. precision_type::value <= 122,
  21. lanczos22UDT,
  22. typename mpl::if_c<
  23. precision_type::value <= 172,
  24. lanczos31UDT,
  25. typename mpl::if_c<
  26. precision_type::value <= 372,
  27. lanczos61UDT,
  28. undefined_lanczos
  29. >::type
  30. >::type
  31. >::type
  32. >::type type;
  33. };
  34. } // namespace lanczos
  35. }} // namespaces
  36. #endif