static private double calcLogProb(int numAppear,double mu){
  final double sigma=calcSigmaFromMu(mu);
  final double logNumAppear=Math.log(numAppear);
  final double overMu=Math.max(logNumAppear - mu,0.0);
  final double res=-(1.0 / 2) * (overMu * overMu) / (sigma * sigma) - s_logSqrtTwoPi - Math.log(sigma);
  assert (res <= 0);
  return res;
}

static private double calcLogProb ( int numAppear , double mu ) { final double sigma = calcSigmaFromMu ( mu ) ; final double logNumAppear = Math . log ( numAppear ) ; final double overMu = Math . max ( logNumAppear - mu , 0.0 ) ; final double res = - ( 1.0 / 2 ) * ( overMu * overMu ) / ( sigma * sigma ) - s_logSqrtTwoPi - Math . log ( sigma ) ; assert ( res <= 0 ) ; return res ; }
calculate the log probability given the message ' s logarithm is normally distributed . note , here we take the natural logarithm of the normal distribution ( lognormal distribution ) which using log properties and rules turns into the equation whose value gets stored in res .
