In my application I need to code incomplete gamma function on CUDA, preferably not as a convergent series, but as a closed expression in term of certain functions that GPU supports. The list includes elementary functions, erf, complete gamma, and Bessel functions.
I wonder whether there is a closed expression for incomplete gamma based on those. Even more interesting, a general question: how does one figures out whether a specific function is expressible in term of a given list of functions?
You can maybe use the formula in wikipedia:
$$\gamma(s,x) = s^{-1}x^se^{-x}M(1,s+1,x)$$ Where M is some Kummers confluent hypergeometric function: $$M(1,s+1,x)=\sum_{k=0}^\infty \frac{x^k}{\prod_{m=1}^k(s+m)}$$
This function if you do step-wise factorization you realize you can calculate with an iterative approach consisting of two steps:
CUDA would benefit from splitting the sum up into partial sums. So that would be a second step to think about.