This project has moved and is read-only. For the latest updates, please go here.

Incomplete Gamma Function

Sep 2, 2009 at 8:50 AM

Hey Guys,

I'm porting the incomplete gamma function but am wondering about the interface: we could offer lower/upper regularized/unregularized incomplete gamma. What would you prefer:

One method:

double IncompleteGamma(double a, double x, bool lower, bool regularized)

or 4 methods:

double LowerIncompleteGamma(double a, double x)
double LowerRegularizedIncompleteGamma(double a, double x)
double UpperIncompleteGamma(double a, double x)
double UpperRegularizedIncompleteGamma(double a, double x)

or something else?

Cheers, J

Sep 2, 2009 at 8:55 AM

Hi Jurgen,

I'd prefer 4 methods.



Sep 2, 2009 at 7:00 PM
Edited Sep 2, 2009 at 7:01 PM

Great, thanks for the work!

I'd prefer 4 methods as well.

Suggestion: can we move "Gamma" to the beginning of the name, i.e.

  • GammaIncompleteLower  (= gamma(a,x))
  • GammaIncompleteUpper  (= Gamma(a,x))
  • GammaRegularizedLower  (= P(a,x))
  • GammaRegularizedUpper  (= Q(a,x))

or maybe

  • GammaLowerIncomplete
  • GammaUpperIncomplete
  • GammaLowerRegularized
  • GammaUpperRegularized