code: def erfinv(x, a=.147):
      
      lnx = log(1 - x * x)
      part1 = (2 / (a * pi) + lnx / 2)
      part2 = lnx / a
      sgn = 1 if x > 0 else -1
      return sgn * sqrt(sqrt(part1 * part1 - part2) - part1)
docs: Approximation of the inverse error function
      https://en.wikipedia.org/wiki/Error_function
      #Approximation_with_elementary_functions