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

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