code: public static double logpdf(double x, double location, double shape) {
      final double v = (x - location) / shape;
      return -FastMath.log(Math.PI * shape * (1 + v * v));
    }
docs: PDF function, static version.
  
  @param x Value
  @param location Location (x0)
  @param shape Shape (gamma)
  @return PDF value