public static double gumbelMaxInverseCDF(double mu, double sigma, double prob) {
		if (prob < 0.0 || prob > 1.0) throw new IllegalArgumentException("Entered cdf value, " + prob + ", must lie between 0 and 1 inclusive");
		double icdf = 0.0D;

		if (prob == 0.0) {
			icdf = Double.NEGATIVE_INFINITY;
		} else {
			if (prob == 1.0) {
				icdf = Double.POSITIVE_INFINITY;
			} else {
				icdf = mu - sigma * Math.log(Math.log(1.0 / prob));
			}
		}

		return icdf;
	}