math icon indicating copy to clipboard operation
math copied to clipboard

add `hypergeometric_1F1`, `log_hypergeometric_1F1` and their gradients

Open spinkney opened this issue 3 years ago • 1 comments

Boost has both of these functions.

The hypergeometric 1F1 function is interesting in that the lower incomplete gamma function can be expressed as

$$ \gamma(a, x) = a^{-1} x^a { _1F_1(a, 1 + a, -x)} $$

spinkney avatar Jun 25 '22 11:06 spinkney

Once the 2F1 is in, I'll also be working these up (if you haven't started already!). Since the gamma_p_inv and gamma_q_inv gradients involve a $_2F_2(a,a; a+1,a+1)$ call, which we can express using the 1F1 (eqn. 24 in this paper). Note that the identity still requires a call to $_2F_2(1,1; 2,2)$ , but this can also be represented pretty trivially in closed form

andrjohns avatar Jul 14 '22 22:07 andrjohns