public static double logPdf(double x,double M,double S){
  if (x < 0)   return Double.NEGATIVE_INFINITY;
  return NormalDistribution.logPdf(Math.log(x),M,S) - Math.log(x);
}

public static double logPdf ( double x , double M , double S ) { if ( x < 0 ) return Double . NEGATIVE_INFINITY ; return NormalDistribution . logPdf ( Math . log ( x ) , M , S ) - Math . log ( x ) ; }
the natural log of the probability density function of the distribution
