Yes. But beware, there are several similar functions in this area.
We provide:
- Fn.Gamma(a) = GAMMA(a) = int(exp(-t)t^(a-1), t=0..infty)
- Fn.GammaRegularized(a,x) = P(a,x) = 1/GAMMA(a) * int(exp(-t)t^(a-1),t=0..x)
This relates to the incomplete gamma functions as follows:
- gamma(a,x) = int(exp(-t)t^(a-1),t=0..x) = lower incomplete gamma function
- Gamma(a,x) = int(exp(-t)t^(a-1),t=x..infty) = upper incomplete gamma function
- P(a,x) = gamma(a,x)/GAMMA(a)
- gamma(a,x) + Gamma(a,x) = GAMMA(a)
Therefore:
- Gamma(a,x) = (1-P(a,x))*GAMMA(a) = (1-Fn.GammaRegularized(a,x))*Fn.Gamma(a)
- gamma(a,x) = P(a,x)*GAMMA(a) = Fn.GammaRegularized(a,x)*Fn.Gamma(a)
Please note that there is currently a known convergence issue in some cases in Fn.GammaRegularized, see here. I'm working on that.