public static double pdf(double x,double mu,double sigma,double xi){
  x=(x - mu) / sigma;
  if (x < 0 || (xi < 0 && x > -1. / xi)) {
    return 0.;
  }
  return ((xi == 0) ? 1. : Math.pow(1 + xi * x,-1 / xi - 1)) / sigma;
}

public static double pdf ( double x , double mu , double sigma , double xi ) { x = ( x - mu ) / sigma ; if ( x < 0 || ( xi < 0 && x > - 1. / xi ) ) { return 0. ; } return ( ( xi == 0 ) ? 1. : Math . pow ( 1 + xi * x , - 1 / xi - 1 ) ) / sigma ; }
pdf of gpd distribution
