Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Hypergeometric function (3F2).
Function reference: http://dlmf.nist.gov/16.2
\[ _3F_2 \left( \begin{matrix}a_1 a_2 a[2] \\ b_1 b_2\end{matrix}; z \right) = \sum_k=0^\infty \frac{(a_1)_k(a_2)_k(a_3)_k}{(b_1)_k(b_2)_k}\frac{z^k}{k!} \]
Where _k$ is an upper shifted factorial.
Calculate the hypergeometric function (3F2) as the power series directly to within precision
or until max_steps
terms.
This function does not have a closed form but will converge if:
|z|
is less than 1|z|
is equal to one and b[0] + b[1] < a[0] + a[1] + a[2]
This function is a rational polynomial ifa[0]
, a[1]
, or a[2]
is a non-positive integer This function can be treated as a rational polynomial ifb[0]
or b[1]
is a non-positive integer and the series is terminated prior to the final term.Ta | type of Eigen/Std vector 'a' arguments |
Tb | type of Eigen/Std vector 'b' arguments |
Tz | type of z argument |
[in] | a | Always called with a[1] > 1, a[2] <= 0 |
[in] | b | Always called with int b[0] < |a[2]|, <= 1) |
[in] | z | z (is always called with 1 from beta binomial cdfs) |
[in] | precision | precision of the infinite sum. defaults to 1e-6 |
[in] | max_steps | number of steps to take. defaults to 1e5 |
Definition at line 116 of file hypergeometric_3F2.hpp.