Even though it doesn't exactly match your input (red dots in the image below), I'd suggest using the third root. In the plot below, this is the blue curve. You can compute this as pow(x, 1/3.)
in most languages, although you might have to pay special care to negative values, i.e. taking the root of the absolute value and negating the result as required.
If you need a better fit to your data, you might also consider using some variant of atan
. The purple curve in the plot is atan(9*x)/atan(9)
.
x red blue purple
1.00 1.000 1.000 1.000
0.40 0.900 0.737 0.890
0.05 0.250 0.368 0.290
0.00 0.000 0.000 0.000
-0.05 -0.250 -0.368 -0.290
-0.40 -0.900 -0.737 -0.890
-1.00 -1.000 -1.000 -1.000
You can also use Wolfram Alpha to plot the third root or this atan function. That way, you can toy with these functions to adapt them to your needs.