/usr/include/boost/math/special_functions/detail
NameSizeModeActions
airy_ai_bi_zero.hpp62940644editdlrm
bernoulli_details.hpp265130644editdlrm
bessel_derivatives_linear.hpp33780644editdlrm
bessel_i0.hpp281350644editdlrm
bessel_i1.hpp299330644editdlrm
bessel_ik.hpp139170644editdlrm
bessel_j0.hpp85850644editdlrm
bessel_j1.hpp89510644editdlrm
bessel_jn.hpp39090644editdlrm
bessel_jy.hpp218680644editdlrm
bessel_jy_asym.hpp64880644editdlrm
bessel_jy_derivatives_asym.hpp46490644editdlrm
bessel_jy_derivatives_series.hpp69440644editdlrm
bessel_jy_series.hpp72410644editdlrm
bessel_jy_zero.hpp249670644editdlrm
bessel_k0.hpp221780644editdlrm
bessel_k1.hpp254650644editdlrm
bessel_kn.hpp22490644editdlrm
bessel_y0.hpp108050644editdlrm
bessel_y1.hpp94580644editdlrm
bessel_yn.hpp31180644editdlrm
daubechies_scaling_integer_grid.hpp2337880644editdlrm
erf_inv.hpp227380644editdlrm
fp_traits.hpp171930644editdlrm
gamma_inva.hpp70660644editdlrm
hypergeometric_0F1_bessel.hpp15430644editdlrm
hypergeometric_1F1_addition_theorems_on_z.hpp129800644editdlrm
hypergeometric_1F1_bessel.hpp327810644editdlrm
hypergeometric_1F1_by_ratios.hpp335400644editdlrm
hypergeometric_1F1_cf.hpp18300644editdlrm
hypergeometric_1F1_large_a.hpp11590644editdlrm
hypergeometric_1F1_large_abz.hpp221010644editdlrm
hypergeometric_1F1_negative_b_regions.hpp333760644editdlrm
hypergeometric_1F1_recurrence.hpp172950644editdlrm
hypergeometric_1F1_scaled_series.hpp21830644editdlrm
hypergeometric_1F1_small_a_negative_b_by_ratio.hpp38930644editdlrm
hypergeometric_asym.hpp59020644editdlrm
hypergeometric_cf.hpp58260644editdlrm
hypergeometric_pade.hpp38370644editdlrm
hypergeometric_pFq_checked_series.hpp279430644editdlrm
hypergeometric_rational.hpp50680644editdlrm
hypergeometric_separated_series.hpp14490644editdlrm
hypergeometric_series.hpp144220644editdlrm
ibeta_inverse.hpp340720644editdlrm
ibeta_inv_ab.hpp103630644editdlrm
iconv.hpp10090644editdlrm
igamma_inverse.hpp174140644editdlrm
igamma_large.hpp395340644editdlrm
lambert_w_lookup_table.ipp156010644editdlrm
lanczos_sse2.hpp89160644editdlrm
lgamma_small.hpp232950644editdlrm
polygamma.hpp225960644editdlrm
round_fwd.hpp27940644editdlrm
t_distribution_inv.hpp177350644editdlrm
unchecked_bernoulli.hpp764370644editdlrm
unchecked_factorial.hpp462900644editdlrm
Edit: /usr/include/boost/math/special_functions/detail/hypergeometric_cf.hpp (5826B)
/////////////////////////////////////////////////////////////////////////////// // Copyright 2014 Anton Bikineev // Copyright 2014 Christopher Kormanyos // Copyright 2014 John Maddock // Copyright 2014 Paul Bristow // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_MATH_DETAIL_HYPERGEOMETRIC_CF_HPP #define BOOST_MATH_DETAIL_HYPERGEOMETRIC_CF_HPP namespace boost { namespace math { namespace detail { // primary template for term of continued fraction template struct hypergeometric_pFq_cf_term; // partial specialization for 0F1 template struct hypergeometric_pFq_cf_term { typedef std::pair result_type; hypergeometric_pFq_cf_term(const T& b, const T& z): n(1), b(b), z(z), term(std::make_pair(T(0), T(1))) { } result_type operator()() { const result_type result = term; ++b; ++n; numer = -(z / (b * n)); term = std::make_pair(numer, 1 - numer); return result; } private: unsigned n; T b; const T z; T numer; result_type term; }; // partial specialization for 1F0 template struct hypergeometric_pFq_cf_term { typedef std::pair result_type; hypergeometric_pFq_cf_term(const T& a, const T& z): n(1), a(a), z(z), term(std::make_pair(T(0), T(1))) { } result_type operator()() { const result_type result = term; ++a; ++n; numer = -((a * z) / n); term = std::make_pair(numer, 1 - numer); return result; } private: unsigned n; T a; const T z; T numer; result_type term; }; // partial specialization for 1F1 template struct hypergeometric_pFq_cf_term { typedef std::pair result_type; hypergeometric_pFq_cf_term(const T& a, const T& b, const T& z): n(1), a(a), b(b), z(z), term(std::make_pair(T(0), T(1))) { } result_type operator()() { const result_type result = term; ++a; ++b; ++n; numer = -((a * z) / (b * n)); term = std::make_pair(numer, 1 - numer); return result; } private: unsigned n; T a, b; const T z; T numer; result_type term; }; // partial specialization for 1f2 template struct hypergeometric_pFq_cf_term { typedef std::pair result_type; hypergeometric_pFq_cf_term(const T& a, const T& b, const T& c, const T& z): n(1), a(a), b(b), c(c), z(z), term(std::make_pair(T(0), T(1))) { } result_type operator()() { const result_type result = term; ++a; ++b; ++c; ++n; numer = -((a * z) / ((b * c) * n)); term = std::make_pair(numer, 1 - numer); return result; } private: unsigned n; T a, b, c; const T z; T numer; result_type term; }; // partial specialization for 2f1 template struct hypergeometric_pFq_cf_term { typedef std::pair result_type; hypergeometric_pFq_cf_term(const T& a, const T& b, const T& c, const T& z): n(1), a(a), b(b), c(c), z(z), term(std::make_pair(T(0), T(1))) { } result_type operator()() { const result_type result = term; ++a; ++b; ++c; ++n; numer = -(((a * b) * z) / (c * n)); term = std::make_pair(numer, 1 - numer); return result; } private: unsigned n; T a, b, c; const T z; T numer; result_type term; }; template inline T compute_cf_pFq(detail::hypergeometric_pFq_cf_term& term, const Policy& pol) { BOOST_MATH_STD_USING boost::uintmax_t max_iter = policies::get_max_series_iterations(); const T result = tools::continued_fraction_b( term, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations( "boost::math::hypergeometric_pFq_cf<%1%>(%1%,%1%,%1%)", max_iter, pol); return result; } template inline T hypergeometric_0F1_cf(const T& b, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term f(b, z); T result = detail::compute_cf_pFq(f, pol); result = ((z / b) / result) + 1; return result; } template inline T hypergeometric_1F0_cf(const T& a, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term f(a, z); T result = detail::compute_cf_pFq(f, pol); result = ((a * z) / result) + 1; return result; } template inline T hypergeometric_1F1_cf(const T& a, const T& b, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term f(a, b, z); T result = detail::compute_cf_pFq(f, pol); result = (((a * z) / b) / result) + 1; return result; } template inline T hypergeometric_1F2_cf(const T& a, const T& b, const T& c, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term f(a, b, c, z); T result = detail::compute_cf_pFq(f, pol); result = (((a * z) / (b * c)) / result) + 1; return result; } template inline T hypergeometric_2F1_cf(const T& a, const T& b, const T& c, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term f(a, b, c, z); T result = detail::compute_cf_pFq(f, pol); result = ((((a * b) * z) / c) / result) + 1; return result; } } } } // namespaces #endif // BOOST_MATH_DETAIL_HYPERGEOMETRIC_CF_HPP