Skip to main content

probit_acklam

Function probit_acklam 

Source
pub fn probit_acklam<P, E, V, const REFINE: bool>(
    p_in: V,
    a: &[E; 6],
    b: &[E; 6],
    c: &[E; 6],
    d: &[E; 5],
) -> V
Expand description

Shared Acklam normal-quantile (probit) core for all real element types.

probit(p) = Phi^-1(p), via Peter John Acklam’s rational approximation (a central region plus a q = sqrt(-2 ln p) tail branch): https://web.archive.org/web/20151030215612/http://home.online.no/~pjacklam/notes/invnorm/

REFINE enables a single Halley step that polishes Acklam’s ~1.15e-9 fit up to full double precision (used by f64; f32 is already at its precision limit without it). The step only runs when the policy precision is Best or higher.

Last built: 2026-09-08 21:35:55 UTC