Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / multiprecision / detail / big_lanczos.hpp
1
2 //  Copyright (c) 2011 John Maddock
3 //  Use, modification and distribution are subject to the
4 //  Boost Software License, Version 1.0. (See accompanying file
5 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 #ifndef BOOST_MP_BIG_LANCZOS
8 #define BOOST_MP_BIG_LANCZOS
9
10 #include <boost/math/bindings/detail/big_lanczos.hpp>
11
12 namespace boost {
13 namespace math {
14
15 namespace lanczos {
16
17 template <class T, class Policy>
18 struct lanczos;
19
20 template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates, class Policy>
21 struct lanczos<multiprecision::number<Backend, ExpressionTemplates>, Policy>
22 {
23    typedef typename boost::math::policies::precision<multiprecision::number<Backend, ExpressionTemplates>, Policy>::type precision_type;
24    typedef typename mpl::if_c<
25        precision_type::value && (precision_type::value <= 73),
26        lanczos13UDT,
27        typename mpl::if_c<
28            precision_type::value && (precision_type::value <= 122),
29            lanczos22UDT,
30            undefined_lanczos>::type>::type type;
31 };
32
33 }
34
35 }} // namespace boost::math::lanczos
36
37 #endif