import math x.append(1 - math.exp( -0.5 * (value1*value2)**2))
I have modified the equation by replacing
0.5. Else for Python <2.7, we’ll have to explicitly type cast the division value to
float because Python round of the result of division of two
int as integer. For example:
0 in python 2.7 and below.