Xi, Tan and Liu proposed two simple algorithms to generate gamma random numbers based on
the ratio-of-uniforms method and logarithmic transformations of gamma random variable.
This implementation is Algorithm 4.1 in the reference. It restricts the range of the shape
parameter to be equal to or less than 1.
It, however, assumes the scale parameter is always 1.
Note that for when the shape parameter < 0.01, it returns numbers in logarithmic scale.
Take exp to convert.
"B. Xi, K. M. Tan, and C. Liu, "Two New Ratio-of-Uniforms Gamma Random Number Generators,"
Technical Report #10-03, Purdue University."