Created
November 3, 2020 15:20
-
-
Save jdh8/79077d926a48c7687f88f9a25e192d24 to your computer and use it in GitHub Desktop.
Polyfill SpecialFunctions.erfinv(::BigFloat)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SpecialFunctions | |
function SpecialFunctions.erfinv(x::BigFloat) | |
c = √big(π) / 2 | |
y::BigFloat = erfinv(Float64(x)) | |
y += c * exp(y * y) * (x - erf(y)) | |
y += c * exp(y * y) * (x - erf(y)) | |
y += c * exp(y * y) * (x - erf(y)) | |
return y | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment