Translated Numerical Recipes C code for incomplete gamma function into pure Ruby: gammp, gammq, invgammp.
Translated Numerical Recipes C code for incomplete gamma function into pure Ruby: gammp, gammq, invgammp.

These use three methods to calculate gammp: quadrature, series, and continued fraction.

All appear to work, but no tests have been written yet.

They were implemented for use in the Gamma distribution, which I'm writing now.

deivid-rodriguez/distribution,deivid-rodriguez/distribution,vaibhav-y/distribution,vaibhav-y/distribution