code: public static double logpdf(double x, double mu, double sigma) {
      x = (x - mu) / sigma;
      return MathUtil.LOG_ONE_BY_SQRTTWOPI - FastMath.log(sigma) - .5 * x * x;
    }
docs: Log probability density function of the normal distribution.
  <p>
  \[\log\frac{1}{\sqrt{2\pi}} - \log\sigma - \tfrac{(x-\mu)^2}{2\sigma^2}\]
  
  @param x The value.
  @param mu The mean.
  @param sigma The standard deviation.
  @return PDF of the given normal distribution at x.