public static double logpdf(double x,double sigma){
  if (x <= 0.) {
    return Double.NEGATIVE_INFINITY;
  }
  final double xs=x / sigma;
  return Math.log(xs / sigma) - .5 * xs * xs;
}

public static double logpdf ( double x , double sigma ) { if ( x <= 0. ) { return Double . NEGATIVE_INFINITY ; } final double xs = x / sigma ; return Math . log ( xs / sigma ) - .5 * xs * xs ; }
pdf of rayleigh distribution
