Inverse of the error function: the x with erf(x) = y, for -1 <= y <= 1 (NaN outside). Equivalent to pracma::erfinv() in R. Unlike pracma, it is accurate for small |y| (pracma's qnorm((1 + y) / 2) loses it: erfinv(1e-300) is -0 there).
pracma::erfinv()
qnorm((1 + y) / 2)
erfinv(1e-300)
erfinv(0.5); // 0.4769362762044699 Copy
erfinv(0.5); // 0.4769362762044699
Inverse of the error function: the x with erf(x) = y, for -1 <= y <= 1 (NaN outside). Equivalent to
pracma::erfinv()in R. Unlike pracma, it is accurate for small |y| (pracma'sqnorm((1 + y) / 2)loses it:erfinv(1e-300)is -0 there).