Skip to main content

inv_log_ndtr_impl

Function inv_log_ndtr_impl 

Source
pub fn inv_log_ndtr_impl<P, E, V>(y: V) -> V
where P: Policy, E: FloatElement, V: FloatVector<Element = E> + SpecializedRealSpecialMath<E>,
Expand description

The inverse of log_ndtr_impl: the x with ln ndtr(x) = y, for y <= 0.

Newton on log_ndtr with the inverse Mills ratio as the derivative, from a probit(e^y) seed one tier down wherever e^y is a normal number, and from the tail asymptotic x^2 = -2y - 2 ln(-x) - ln 2 pi (one substitution) below y = -700. ln ndtr is concave and increasing, so every Newton step lands left of the root and the iteration is monotone from there. No bracket is needed. The residual tolerance is a few ulp of y, which is the forward’s own noise floor and, through the ratio |y| / (x phi/Phi), under two ulp of x everywhere.

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