def erfinv(y):
 return (ndtri(((y + 1) / 2.0)) / sqrt(2))

def erfinv ( y ) : return ( ndtri ( ( ( y + 1 ) / 2.0 ) ) / sqrt ( 2 ) )
approximation of the inverse error function URL #approximation_with_elementary_functions .