public static double logpdf(double x,double mu,double beta){
  if (x == Double.NEGATIVE_INFINITY) {
    return Double.NEGATIVE_INFINITY;
  }
  final double z=(x - mu) / beta;
  return -z - Math.exp(-z) - Math.log(beta);
}

public static double logpdf ( double x , double mu , double beta ) { if ( x == Double . NEGATIVE_INFINITY ) { return Double . NEGATIVE_INFINITY ; } final double z = ( x - mu ) / beta ; return - z - Math . exp ( - z ) - Math . log ( beta ) ; }
log pdf of gumbel distribution
