]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/math/special_functions/chebyshev_transform.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / math / special_functions / chebyshev_transform.hpp
index e50c40bd9249af20312ed0aec4fa3aaee1365be2..81543c6f4577cbbab507669b60ebe652723e4f02 100644 (file)
@@ -116,7 +116,7 @@ public:
     template<class F>
     chebyshev_transform(const F& f, Real a, Real b,
        Real tol = 500 * std::numeric_limits<Real>::epsilon(),
-       size_t max_refinements = 15) : m_a(a), m_b(b)
+       size_t max_refinements = 16) : m_a(a), m_b(b)
     {
         if (a >= b)
         {
@@ -174,16 +174,9 @@ public:
         }
     }
 
-    Real operator()(Real x) const
+    inline Real operator()(Real x) const
     {
-        using boost::math::constants::half;
-        if (x > m_b || x < m_a)
-        {
-            throw std::domain_error("x not in [a, b]\n");
-        }
-
-        Real z = (2*x - m_a - m_b)/(m_b - m_a);
-        return chebyshev_clenshaw_recurrence(m_coeffs.data(), m_coeffs.size(), z);
+        return chebyshev_clenshaw_recurrence(m_coeffs.data(), m_coeffs.size(), m_a, m_b, x);
     }
 
     // Integral over entire domain [a, b]