nisp_erfcinv — Computes the inverse erfc function.
y = nisp_erfcinv ( x )
This function computes the inverse of the erfc function. This function is ill-conditioned when x is close to 1 or when x is close to 2: this might lead to inaccurate results.
nisp_erfcinv(1.e-3) expected = 2.326753765513525 // Plot the function scf(); x = linspace(1.e-5,2-1.e-5,1000); y = nisp_erfcinv(x); plot(x,y); // This implementation is accurate, even if x is small: nisp_erfcinv ( 10^-20 ) expected = 6.6015806223551425615163916324187 // By contrast, the mathematically correct erfinv(1-x) // formula gives poor results: x = 10^-20 erfinv(1-x) expected = 6.6015806223551425615163916324187 // erfcinv is ill-conditioned when x is close to 1. nisp_erfcinv(1-1.e-15) expected = 8.862269254527580136e-16 // erfcinv is ill-conditioned when x is close to 2. nisp_erfcinv(2-1.e-12) expected = -5.04202974563905937
Dider Pelat, "Bases et méthodes pour le traitement de données", section 8.2.8, "Loi log-normale".
Wikipedia, Lognormal probability distribution function, http://en.wikipedia.org/wiki/File:Lognormal_distribution_PDF.png
Wikipedia, Lognormal cumulated distribution function, http://en.wikipedia.org/wiki/File:Lognormal_distribution_CDF.png