There is a very concise algorithm for computing lower incomplete gamma function:
https://people.sc.fsu.edu/~jburkardt/f_src/asa147/asa147.html
We coded this in C++. There is one thing I don't understand in this algorithm. In one place to compute the following expression:
it is substituted by:
Obviously this is the same, but why it is done like this? Is computing exp of lgamma more efficient than computing tgamma function (both lgamma
and tgamma
are available in C++)?