JuliaLang/julia — pull request #2987 by stevengj (2013-05-01 19:06:22+00:00)
Title: add inverse error functions erfinv and erfcinv

This patch adds functions `erfinv` and `erfcinv` that compute the inverse of the error function (`erf`) and the complementary error function (`erfc`) for real arguments, respectively.

It uses the rational approximants described by [Blair et al.](http://dx.doi.org/10.1090/S0025-5718-1976-0421040-7). This is an independent, from-scratch implementation, so there should be no copyright concerns. (I use the tables of coefficients from Blair, but mathematical data of this sort is not generally subject to copyright.)

There are separate double- and single-precision versions, since the latter can be computed more cheaply using lower-degree approximants. Complex arguments are not supported (this would be a much harder problem and I'm not sure if it has been addressed in the literature.)