]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / math / special_functions / detail / hypergeometric_1F1_recurrence.hpp
index edf5926ef42638b761d3596d60cd6373b95fd7a3..6f1461ffc998ccc8799fb31979c97e0e8a9e1e1c 100644 (file)
@@ -24,7 +24,7 @@
   inline T hypergeometric_1F1_imp(const T& a, const T& b, const T& z, const Policy& pol);
 
   template <class T, class Policy>
-  inline T hypergeometric_1F1_imp(const T& a, const T& b, const T& z, const Policy& pol, int& log_scaling);
+  inline T hypergeometric_1F1_imp(const T& a, const T& b, const T& z, const Policy& pol, long long& log_scaling);
 
   template <class T>
   struct hypergeometric_1F1_recurrence_a_coefficients
@@ -36,7 +36,7 @@
     {
     }
 
-    result_type operator()(boost::intmax_t i) const
+    result_type operator()(std::intmax_t i) const
     {
       const T ai = a + i;
 
@@ -62,7 +62,7 @@
     {
     }
 
-    result_type operator()(boost::intmax_t i) const
+    result_type operator()(std::intmax_t i) const
     {
       const T bi = b + i;
 
@@ -75,7 +75,7 @@
 
   private:
     const T a, b, z;
-    hypergeometric_1F1_recurrence_b_coefficients& operator=(const hypergeometric_1F1_recurrence_b_coefficients&);
+    hypergeometric_1F1_recurrence_b_coefficients& operator=(const hypergeometric_1F1_recurrence_b_coefficients&) = delete;
   };
   //
   // for use when we're recursing to a small b:
@@ -90,7 +90,7 @@
      {
      }
 
-     result_type operator()(boost::intmax_t i) const
+     result_type operator()(std::intmax_t i) const
      {
         const T bi = b + (i + N);
         const T bi_minus_1 = b + (i + N - 1);
      }
 
   private:
-     hypergeometric_1F1_recurrence_small_b_coefficients operator=(const hypergeometric_1F1_recurrence_small_b_coefficients&);
+     hypergeometric_1F1_recurrence_small_b_coefficients operator=(const hypergeometric_1F1_recurrence_small_b_coefficients&) = delete;
      const T a, b, z;
      int N;
   };
     {
     }
 
-    result_type operator()(boost::intmax_t i) const
+    result_type operator()(std::intmax_t i) const
     {
       const T ai = a + (offset + i);
       const T bi = b + (offset + i);
   private:
     const T a, b, z;
     int offset;
-    hypergeometric_1F1_recurrence_a_and_b_coefficients operator=(const hypergeometric_1F1_recurrence_a_and_b_coefficients&);
+    hypergeometric_1F1_recurrence_a_and_b_coefficients operator=(const hypergeometric_1F1_recurrence_a_and_b_coefficients&) = delete;
   };
 #if 0
   //
      {
      }
 
-     result_type operator()(boost::intmax_t i) const
+     result_type operator()(std::intmax_t i) const
      {
         i *= 2;
         const T ai = a + (offset + i);
      {
      }
 
-     result_type operator()(boost::intmax_t i) const
+     result_type operator()(std::intmax_t i) const
      {
         i *= 2;
         const T ai = a + (offset + i);
      {
      }
 
-     result_type operator()(boost::intmax_t i) const
+     result_type operator()(std::intmax_t i) const
      {
         i *= 2;
         const T bi = b + (offset + i);
      {
      }
 
-     result_type operator()(boost::intmax_t i) const
+     result_type operator()(std::intmax_t i) const
      {
         const T ai = a + (offset + i);
         const T bi = b - (offset + i);
 #endif
 
   template <class T, class Policy>
-  inline T hypergeometric_1F1_backward_recurrence_for_negative_a(const T& a, const T& b, const T& z, const Policy& pol, const char* function, int& log_scaling)
+  inline T hypergeometric_1F1_backward_recurrence_for_negative_a(const T& a, const T& b, const T& z, const Policy& pol, const char* function, long long& log_scaling)
   {
     BOOST_MATH_STD_USING // modf, frexp, fabs, pow
 
-    boost::intmax_t integer_part = 0;
+    std::intmax_t integer_part = 0;
     T ak = modf(a, &integer_part);
     //
     // We need ak-1 positive to avoid infinite recursion below:
        integer_part -= 2;
     }
 
-    if (-integer_part > static_cast<boost::intmax_t>(policies::get_max_series_iterations<Policy>()))
+    if (-integer_part > static_cast<std::intmax_t>(policies::get_max_series_iterations<Policy>()))
        return policies::raise_evaluation_error<T>(function, "1F1 arguments sit in a range with a so negative that we have no evaluation method, got a = %1%", std::numeric_limits<T>::quiet_NaN(), pol);
 
     T first, second;
     }
     else
     {
-       int scaling1(0), scaling2(0);
+       long long scaling1(0), scaling2(0);
        first = detail::hypergeometric_1F1_imp(ak, b, z, pol, scaling1);
        ak -= 1;
        second = detail::hypergeometric_1F1_imp(ak, b, z, pol, scaling2);
 
 
   template <class T, class Policy>
-  T hypergeometric_1F1_backwards_recursion_on_b_for_negative_a(const T& a, const T& b, const T& z, const Policy& pol, const char*, int& log_scaling)
+  T hypergeometric_1F1_backwards_recursion_on_b_for_negative_a(const T& a, const T& b, const T& z, const Policy& pol, const char*, long long& log_scaling)
   {
      using std::swap;
      BOOST_MATH_STD_USING // modf, frexp, fabs, pow
      // to recurse on a and b together when we can.
      //
 
-     BOOST_ASSERT(a < -1); // Not tested nor taken for -1 < a < 0
+     BOOST_MATH_ASSERT(a < -1); // Not tested nor taken for -1 < a < 0
 
      int b_shift = itrunc(z - b) + 2;
 
      // If the shifts are so large that we would throw an evaluation_error, try the series instead,
      // even though this will almost certainly throw as well:
      //
-     if (b_shift > static_cast<boost::intmax_t>(boost::math::policies::get_max_series_iterations<Policy>()))
+     if (b_shift > static_cast<std::intmax_t>(boost::math::policies::get_max_series_iterations<Policy>()))
         return hypergeometric_1F1_checked_series_impl(a, b, z, pol, log_scaling);
 
-     if (a_shift > static_cast<boost::intmax_t>(boost::math::policies::get_max_series_iterations<Policy>()))
+     if (a_shift > static_cast<std::intmax_t>(boost::math::policies::get_max_series_iterations<Policy>()))
         return hypergeometric_1F1_checked_series_impl(a, b, z, pol, log_scaling);
 
      int a_b_shift = b < 0 ? itrunc(b + b_shift) : b_shift;   // The max we can shift on a and b together
         --leading_a_shift;
      }
 
-     BOOST_ASSERT(leading_a_shift > 1);
-     BOOST_ASSERT(a_b_shift + leading_a_shift + (a_b_shift == 0 ? 1 : 0) == a_shift);
-     BOOST_ASSERT(a_b_shift + trailing_b_shift == b_shift);
+     BOOST_MATH_ASSERT(leading_a_shift > 1);
+     BOOST_MATH_ASSERT(a_b_shift + leading_a_shift + (a_b_shift == 0 ? 1 : 0) == a_shift);
+     BOOST_MATH_ASSERT(a_b_shift + trailing_b_shift == b_shift);
 
      if ((trailing_b_shift == 0) && (fabs(b) < 0.5) && a_b_shift)
      {
      }
 
      T first, second;
-     int scale1(0), scale2(0);
+     long long scale1(0), scale2(0);
      first = boost::math::detail::hypergeometric_1F1_imp(T(a + a_shift), T(b + b_shift), z, pol, scale1);
      //
      // It would be good to compute "second" from first and the ratio - unfortunately we are right on the cusp