@jennystone: the reason for using `lgam` is usually that the Gamma function overflows already at rather small arguments.

However, a better option is to use `poch(z, m)` for `Gamma(z + m) / Gamma(z)` and `beta(a, b)` for `Gamma(a)*Gamma(b) / Gamma(a+b)`, as the dedicated functions handle difficult argument regions better.