public static double logpdf(double x,double location,double shape){
  final double v=(x - location) / shape;
  return -Math.log(Math.PI * shape * (1 + v * v));
}

public static double logpdf ( double x , double location , double shape ) { final double v = ( x - location ) / shape ; return - Math . log ( Math . PI * shape * ( 1 + v * v ) ) ; }
pdf function , static version .
