public static double logPdf(double x,double m,double sd){
  double a=1.0 / (Math.sqrt(2.0 * Math.PI) * sd);
  double b=-(x - m) * (x - m) / (2.0 * sd * sd);
  return Math.log(a) + b;
}

public static double logPdf ( double x , double m , double sd ) { double a = 1.0 / ( Math . sqrt ( 2.0 * Math . PI ) * sd ) ; double b = - ( x - m ) * ( x - m ) / ( 2.0 * sd * sd ) ; return Math . log ( a ) + b ; }
the natural log of the probability density function of the distribution
