The GAMINV function
returns the

p^{th} quantile from the gamma distribution, with shape parameter

a. The probability that an observation from a
gamma distribution is less than or equal to the returned quantile
is

p.

Note: GAMINV is the inverse of
the PROBGAM function.