Given a, b, c and z, compute Gauss' Hypergeometric Function, specified
by the series:
1 + (a * b/c) * z + (a * (a + 1) * b * (b + 1) / ((c * (c + 1)) * z**2 / 2 +
... (a)_n * (b)_n / (c)_n * z ** n / n! + ....
Args
a
Floating-point Tensor, broadcastable with b, c, z. Parameter for the
numerator of the series fraction.
b
Floating-point Tensor, broadcastable with a, c, z. Parameter for the
numerator of the series fraction.
c
Floating-point Tensor, broadcastable with a, b, z. Parameter for the
denominator of the series fraction.
z
Floating-point Tensor, broadcastable a, b, c. Value to compute
2F1(a, b, c, z) at. Only values of |z| < 1 are allowed.
name
A name for the operation (optional).
Default value: None (i.e., 'continued_fraction').
Returns
hypergeo
2F1(a, b, c, z)
References
[1] F. Johansson. Computing hypergeometric functions rigorously.
ACM Transactions on Mathematical Software, August 2019.
https://arxiv.org/abs/1606.06977
[2] J. Pearson, S. Olver, M. Porter. Numerical methods for the computation of
the confluent and Gauss hypergeometric functions.
Numerical Algorithms, August 2016.
[3] M. Abramowitz, I. Stegun. Handbook of Mathematical Functions with
Formulas, Graphs and Mathematical Tables.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[],null,["# tfp.math.hypergeometric.hyp2f1_small_argument\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/python/math/hypergeometric.py#L524-L681) |\n\nCompute the Hypergeometric function 2f1(a, b, c, z) when \\|z\\| \\\u003c= 1. \n\n tfp.math.hypergeometric.hyp2f1_small_argument(\n a, b, c, z, name=None\n )\n\nGiven `a, b, c` and `z`, compute Gauss' Hypergeometric Function, specified\nby the series:\n\n`1 + (a * b/c) * z + (a * (a + 1) * b * (b + 1) / ((c * (c + 1)) * z**2 / 2 +\n... (a)_n * (b)_n / (c)_n * z ** n / n! + ....`\n| **Note:** Gradients with only respect to `z` are available. NOTE: It is recommended that the arguments are `float64` due to the heavy loss of precision in float32.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------|\n| `a` | Floating-point `Tensor`, broadcastable with `b, c, z`. Parameter for the numerator of the series fraction. |\n| `b` | Floating-point `Tensor`, broadcastable with `a, c, z`. Parameter for the numerator of the series fraction. |\n| `c` | Floating-point `Tensor`, broadcastable with `a, b, z`. Parameter for the denominator of the series fraction. |\n| `z` | Floating-point `Tensor`, broadcastable `a, b, c`. Value to compute `2F1(a, b, c, z)` at. Only values of `|z| \u003c 1` are allowed. |\n| `name` | A name for the operation (optional). Default value: `None` (i.e., 'continued_fraction'). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|------------|-------------------|\n| `hypergeo` | `2F1(a, b, c, z)` |\n\n\u003cbr /\u003e\n\n#### References\n\n\\[1\\] F. Johansson. Computing hypergeometric functions rigorously.\nACM Transactions on Mathematical Software, August 2019.\n\u003chttps://arxiv.org/abs/1606.06977\u003e\n\\[2\\] J. Pearson, S. Olver, M. Porter. Numerical methods for the computation of\nthe confluent and Gauss hypergeometric functions.\nNumerical Algorithms, August 2016.\n\\[3\\] M. Abramowitz, I. Stegun. Handbook of Mathematical Functions with\nFormulas, Graphs and Mathematical Tables."]]