The EZCOUNT.lng Model

The Log Gamma Function

View the model

Download the model

This model computes the number of ways of selecting 5 objects from a set of 52 objects.

This is expressed by 52!/(5!*(52-5)!), or more generally, the number of ways of choosing k objects from n is n!/(k!*(n-k)!). The intermediate factorial expressions may be very large and result in overflow. We avoid possible overflow by working with the logs of the intermediate expressions. Note that:

Gamma(n+1) = n!, and LGM(n+1) = Log(Gamma(n+1)).

Keywords:

Gamma Function | Log Gamma | Advanced Math | Combinations | Poker | Binomial Coefficient | n choose k | Choose Function |