Properties
The maximum number of iterations permitted in the chi-square cdf computation
The maximum number of terms permitted when summing the incomplete gamma series.
The maximum number of iterations permitted for the incomplete gamma function evaluation process.
Below this probability, invCDF uses the closed-form lower-tail asymptotic seed instead of AS 91. The asymptotic x ~ scale * (p * shape * Gamma(shape))^(1/shape) has leading-order error O(p^(1/shape)), which is below 1e-3 once p drops below ~1e-12 for typical shape values.
Functions
Computes the digamma function using AS 103
Computes the gamma function at x
Computes the natural logarithm of the gamma function at x. Useful when x gets large.
Computes the parameters (shape and scale) by matching to mean and variance element0 = shape element1 = scale
Computes the parameters (shape and scale) by matching to mean and variance element0 = shape element1 = scale