public static double cdf(double x,double sigma){
  if (x <= 0.) {
    return 0.;
  }
  final double xs=x / sigma;
  return 1. - Math.exp(-.5 * xs * xs);
}

public static double cdf ( double x , double sigma ) { if ( x <= 0. ) { return 0. ; } final double xs = x / sigma ; return 1. - Math . exp ( - .5 * xs * xs ) ; }
cdf of rayleigh distribution
