Skip to content

Instantly share code, notes, and snippets.

@jdh8
Created November 3, 2020 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdh8/79077d926a48c7687f88f9a25e192d24 to your computer and use it in GitHub Desktop.
Save jdh8/79077d926a48c7687f88f9a25e192d24 to your computer and use it in GitHub Desktop.
Polyfill SpecialFunctions.erfinv(::BigFloat)
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