#ifndef BOOST_MATH_HYPERGEOMETRIC_PFQ_HPP
#define BOOST_MATH_HYPERGEOMETRIC_PFQ_HPP
-#include <boost/config.hpp>
-
-#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || defined(BOOST_NO_CXX11_LAMBDAS) || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || defined(BOOST_NO_CXX11_HDR_CHRONO)
-# error "hypergeometric_pFq requires a C++11 compiler"
-#endif
-
#include <boost/math/special_functions/detail/hypergeometric_pFq_checked_series.hpp>
+#include <boost/math/tools/throw_exception.hpp>
#include <chrono>
#include <initializer_list>
struct timed_iteration_terminator
{
- timed_iteration_terminator(boost::uintmax_t i, double t) : max_iter(i), max_time(t), start_time(std::chrono::system_clock::now()) {}
+ timed_iteration_terminator(std::uintmax_t i, double t) : max_iter(i), max_time(t), start_time(std::chrono::system_clock::now()) {}
- bool operator()(boost::uintmax_t iter)const
+ bool operator()(std::uintmax_t iter)const
{
if (iter > max_iter)
- boost::throw_exception(boost::math::detail::pFq_termination_exception("pFq exceeded maximum permitted iterations."));
+ BOOST_MATH_THROW_EXCEPTION(boost::math::detail::pFq_termination_exception("pFq exceeded maximum permitted iterations."));
if (std::chrono::duration<double>(std::chrono::system_clock::now() - start_time).count() > max_time)
- boost::throw_exception(boost::math::detail::pFq_termination_exception("pFq exceeded maximum permitted evaluation time."));
+ BOOST_MATH_THROW_EXCEPTION(boost::math::detail::pFq_termination_exception("pFq exceeded maximum permitted evaluation time."));
return false;
}
- boost::uintmax_t max_iter;
+ std::uintmax_t max_iter;
double max_time;
std::chrono::system_clock::time_point start_time;
};
BOOST_MATH_STD_USING
- int scale = 0;
+ long long scale = 0;
std::pair<value_type, value_type> r = boost::math::detail::hypergeometric_pFq_checked_series_impl(aj, bj, value_type(z), pol, boost::math::detail::iteration_terminator(boost::math::policies::get_max_series_iterations<forwarding_policy>()), scale);
r.first *= exp(Real(scale));
r.second *= exp(Real(scale));
z.precision(current_precision);
try
{
- int scale = 0;
+ long long scale = 0;
std::pair<Real, Real> rp = boost::math::detail::hypergeometric_pFq_checked_series_impl(aa, bb, z, pol, boost::math::detail::timed_iteration_terminator(boost::math::policies::get_max_series_iterations<Policy>(), timeout), scale);
rp.first *= exp(Real(scale));
rp.second *= exp(Real(scale));