code: public static double cdf(double val, double mu, double beta) {
      return FastMath.exp(-FastMath.exp(-(val - mu) / beta));
    }
docs: CDF of Gumbel distribution
  
  @param val Value
  @param mu Mode
  @param beta Shape
  @return CDF at position x.