2

I'm running some python code using the gamma function and it involves dividing one gamma function with another. Unfortunately because both the numerator and denominator are so large, python outputs a maths range error, even though the fraction is equivalent to a small finite number. Therefore it needs to be simplified.

Here is the function I therefore need to simply ( attached as a picture):

Composite gamma functions that need to be simplified

piccolo
  • 241

2 Answers2

1

HINT: Use the Beta function and ist symmetry in the two arguments.

It holds: $\Gamma(m + \beta + 1) \Gamma(k + \alpha + 1) = B(m + \beta + 1, k + \alpha + 1) \Gamma(m+k+ \beta + \alpha + 2)$.

In the denominator it holds a similar identity; use the symmetry of the Beta function to simplify.

kryomaxim
  • 2,882
0

I do not know the kind of accuracy you expect. So, forgive me if I am off-topic.

What I should do is : take the logarithms and for each logarithm of any gamma function, use Stirling series (http://en.wikipedia.org/wiki/Stirling%27s_approximation) $$\log(n!)=n\log(\frac ne) + \frac 12 \log(2\pi n)+\log(1+\frac{1}{12 n}+\frac{1}{288 n^2}-\frac{139}{51840 n^3}+\cdots)$$ When all terms will have been added, exponentiate the result.