code: public static double logpdf(double val, double loc, double scale) {
      val = Math.abs((val - loc) / scale);
      double f = 1.0 + FastMath.exp(-val);
      return -val - FastMath.log(scale * f * f);
    }
docs: log Probability density function.
  
  @param val Value
  @param loc Location
  @param scale Scale
  @return log PDF