/
usr
/
include
/
boost
/
math
/
special_functions
/
detail
/
/usr/include/boost/math/special_functions/detail
mkdir
upload
Name
Size
Mode
Actions
airy_ai_bi_zero.hpp
6294
0644
edit
dl
rm
bernoulli_details.hpp
26513
0644
edit
dl
rm
bessel_derivatives_linear.hpp
3378
0644
edit
dl
rm
bessel_i0.hpp
28135
0644
edit
dl
rm
bessel_i1.hpp
29933
0644
edit
dl
rm
bessel_ik.hpp
13917
0644
edit
dl
rm
bessel_j0.hpp
8585
0644
edit
dl
rm
bessel_j1.hpp
8951
0644
edit
dl
rm
bessel_jn.hpp
3909
0644
edit
dl
rm
bessel_jy.hpp
21868
0644
edit
dl
rm
bessel_jy_asym.hpp
6488
0644
edit
dl
rm
bessel_jy_derivatives_asym.hpp
4649
0644
edit
dl
rm
bessel_jy_derivatives_series.hpp
6944
0644
edit
dl
rm
bessel_jy_series.hpp
7241
0644
edit
dl
rm
bessel_jy_zero.hpp
24967
0644
edit
dl
rm
bessel_k0.hpp
22178
0644
edit
dl
rm
bessel_k1.hpp
25465
0644
edit
dl
rm
bessel_kn.hpp
2249
0644
edit
dl
rm
bessel_y0.hpp
10805
0644
edit
dl
rm
bessel_y1.hpp
9458
0644
edit
dl
rm
bessel_yn.hpp
3118
0644
edit
dl
rm
daubechies_scaling_integer_grid.hpp
233788
0644
edit
dl
rm
erf_inv.hpp
22738
0644
edit
dl
rm
fp_traits.hpp
17193
0644
edit
dl
rm
gamma_inva.hpp
7066
0644
edit
dl
rm
hypergeometric_0F1_bessel.hpp
1543
0644
edit
dl
rm
hypergeometric_1F1_addition_theorems_on_z.hpp
12980
0644
edit
dl
rm
hypergeometric_1F1_bessel.hpp
32781
0644
edit
dl
rm
hypergeometric_1F1_by_ratios.hpp
33540
0644
edit
dl
rm
hypergeometric_1F1_cf.hpp
1830
0644
edit
dl
rm
hypergeometric_1F1_large_a.hpp
1159
0644
edit
dl
rm
hypergeometric_1F1_large_abz.hpp
22101
0644
edit
dl
rm
hypergeometric_1F1_negative_b_regions.hpp
33376
0644
edit
dl
rm
hypergeometric_1F1_recurrence.hpp
17295
0644
edit
dl
rm
hypergeometric_1F1_scaled_series.hpp
2183
0644
edit
dl
rm
hypergeometric_1F1_small_a_negative_b_by_ratio.hpp
3893
0644
edit
dl
rm
hypergeometric_asym.hpp
5902
0644
edit
dl
rm
hypergeometric_cf.hpp
5826
0644
edit
dl
rm
hypergeometric_pade.hpp
3837
0644
edit
dl
rm
hypergeometric_pFq_checked_series.hpp
27943
0644
edit
dl
rm
hypergeometric_rational.hpp
5068
0644
edit
dl
rm
hypergeometric_separated_series.hpp
1449
0644
edit
dl
rm
hypergeometric_series.hpp
14422
0644
edit
dl
rm
ibeta_inverse.hpp
34072
0644
edit
dl
rm
ibeta_inv_ab.hpp
10363
0644
edit
dl
rm
iconv.hpp
1009
0644
edit
dl
rm
igamma_inverse.hpp
17414
0644
edit
dl
rm
igamma_large.hpp
39534
0644
edit
dl
rm
lambert_w_lookup_table.ipp
15601
0644
edit
dl
rm
lanczos_sse2.hpp
8916
0644
edit
dl
rm
lgamma_small.hpp
23295
0644
edit
dl
rm
polygamma.hpp
22596
0644
edit
dl
rm
round_fwd.hpp
2794
0644
edit
dl
rm
t_distribution_inv.hpp
17735
0644
edit
dl
rm
unchecked_bernoulli.hpp
76437
0644
edit
dl
rm
unchecked_factorial.hpp
46290
0644
edit
dl
rm
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 <class T, unsigned p, unsigned q> struct hypergeometric_pFq_cf_term; // partial specialization for 0F1 template <class T> struct hypergeometric_pFq_cf_term<T, 0u, 1u> { typedef std::pair<T,T> 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 <class T> struct hypergeometric_pFq_cf_term<T, 1u, 0u> { typedef std::pair<T,T> 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 <class T> struct hypergeometric_pFq_cf_term<T, 1u, 1u> { typedef std::pair<T,T> 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 <class T> struct hypergeometric_pFq_cf_term<T, 1u, 2u> { typedef std::pair<T,T> 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 <class T> struct hypergeometric_pFq_cf_term<T, 2u, 1u> { typedef std::pair<T,T> 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 <class T, unsigned p, unsigned q, class Policy> inline T compute_cf_pFq(detail::hypergeometric_pFq_cf_term<T, p, q>& term, const Policy& pol) { BOOST_MATH_STD_USING boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>(); const T result = tools::continued_fraction_b( term, boost::math::policies::get_epsilon<T, Policy>(), max_iter); boost::math::policies::check_series_iterations<T>( "boost::math::hypergeometric_pFq_cf<%1%>(%1%,%1%,%1%)", max_iter, pol); return result; } template <class T, class Policy> inline T hypergeometric_0F1_cf(const T& b, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term<T, 0u, 1u> f(b, z); T result = detail::compute_cf_pFq(f, pol); result = ((z / b) / result) + 1; return result; } template <class T, class Policy> inline T hypergeometric_1F0_cf(const T& a, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term<T, 1u, 0u> f(a, z); T result = detail::compute_cf_pFq(f, pol); result = ((a * z) / result) + 1; return result; } template <class T, class Policy> inline T hypergeometric_1F1_cf(const T& a, const T& b, const T& z, const Policy& pol) { detail::hypergeometric_pFq_cf_term<T, 1u, 1u> f(a, b, z); T result = detail::compute_cf_pFq(f, pol); result = (((a * z) / b) / result) + 1; return result; } template <class T, class Policy> 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<T, 1u, 2u> f(a, b, c, z); T result = detail::compute_cf_pFq(f, pol); result = (((a * z) / (b * c)) / result) + 1; return result; } template <class T, class Policy> 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<T, 2u, 1u> 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
Save
cmd:
run