def METHOD_NAME(a: mpf, tol: float = 1e-16) -> mpf:
    if a == mpf("1") or a == mpf("-1") or abs(a) < 0.9:
        return mp.METHOD_NAME(a)
    u = mp.ln(2 / mp.pi / (abs(a) - 1) ** 2)
    x0 = mp.sign(a) * mp.sqrt(u - mp.ln(u)) / mp.sqrt(2)
    def f(t):
        return mp.erf(t) - a
    return mp.findroot(f, x0, tol=tol)