def kolmogorov(x):
 if (x < 0.27):
  return 1.0
 if (x > 3.2):
  return 0.0
 x = (((-2.0) * x) * x)
 k = 0
 for i in reversed(xrange(1, (27 + 1), 2)):
  k = ((1 - k) * exp((x * i)))
 return (2.0 * k)

def kolmogorov ( x ) : if ( x < 0.27 ) : return 1.0 if ( x > 3.2 ) : return 0.0 x = ( ( ( - 2.0 ) * x ) * x ) k = 0 for i in reversed ( xrange ( 1 , ( 27 + 1 ) , 2 ) ) : k = ( ( 1 - k ) * exp ( ( x * i ) ) ) return ( 2.0 * k )
returns the approximation of kolmogorovs distribution of the two-sample test .