Expand description
Special functions behind the inverse-CDF samplers: the standard
normal quantile and CDF, ln Γ, and the regularized incomplete
beta and gamma functions with their inverses. The node library’s
distribution tables (polydat-nodes, sampling::icd) and the
comprehension runtime’s named-measure sampling
(comprehension_forms.md §10.2 R2) compute from the same bodies,
so a normal node and a normal comprehension source agree bit
for bit on the same quantile.
Functions§
- inv_
regularized_ beta - Inverse regularized beta via bisection.
- inv_
regularized_ gamma_ p - Inverse regularized gamma P via bisection.
- ln_
gamma - Lanczos approximation of ln(Gamma(x)) for x > 0.
- normal_
cdf - The standard normal CDF
Φ(x), through the regularized lower incomplete gamma function:Φ(x) = ½(1 + sgn(x)·P(½, x²/2)). - probit
- Rational approximation of the standard normal quantile function.
Abramowitz & Stegun 26.2.23: the absolute error is below
4.5e-4 everywhere in (0, 1).
0and1map to the infinities. - regularized_
beta - Regularized incomplete beta function I_x(a, b) via series expansion.
- regularized_
gamma_ p - Regularized lower incomplete gamma function P(a, x) via series.