Debian Codegraph @

third-party/boost-math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_a.hpp

raw
1
2 ///////////////////////////////////////////////////////////////////////////////
3 // Copyright 2018 John Maddock
4 // Distributed under the Boost
5 // Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 //
8 #ifndef BOOST_MATH_HYPERGEOMETRIC_1F1_CF_HPP
9 #define BOOST_MATH_HYPERGEOMETRIC_1F1_CF_HPP
10 //
11 // Evaluation of 1F1 by continued fraction
12 // by asymptotic approximation for large a,
13 // see https://dlmf.nist.gov/13.8#E9
14 //
15 // This is not terribly useful, as it only gets a few digits correct even for very
16 // large a, also needs b and z small:
17 //
18
19
20 namespace boost { namespace math { namespace detail {
21
22 template <class T, class Policy>
23 T hypergeometric_1F1_large_neg_a_asymtotic_dlmf_13_8_9(T a, T b, T z, const Policy& pol)
24 {
25 T result = boost::math::cyl_bessel_j(b - 1, sqrt(2 * z * (b - 2 * a)), pol);
26 result *= boost::math::tgamma(b, pol) * exp(z / 2);
27 T p = pow((b / 2 - a) * z, (1 - b) / 4);
28 result *= p;
29 result *= p;
30 return result;
31 }
32
33 } } } // namespaces
34
35 #endif // BOOST_MATH_HYPERGEOMETRIC_1F1_BESSEL_HPP