OK, so you're basically looking for a continuous monotone function N: [0,∞) → (0,1] such that:
- limx → 0 N(x) = 1, and
- limx → ∞ N(x) = 0.
In that case, the "obvious" choice would be N(x) = 1 / (x + 1), or, in Python:
def invnorm (x):
return 1.0 / (x + 1)
Of course, there are also infinitely many other functions that satisfy these criteria, like N(x) = 1 / (x + 1)a for any positive real number a.
Yet another "natural" choice would be N(x) = e−x, or, in Python:
def invnorm (x):
return math.exp(-x)
This can also be rescaled to N(x) = b−x for any real number b > 1 while still satisfying your requirements.
And of course, if we relax the monotonicity requirement (which I just assumed, even though you did not state it explicitly), even weirder functions like Abhishek Bansal's N(x) = sin(x) / x will qualify.