code: public static double gammaCdf(double x, double a, double b) {
          if(a<=0 || b<=0) {
              throw new IllegalArgumentException("All the parameters must be positive.");
          }
          
          double GammaCdf = ContinuousDistributions.gammaCdf(x/b, a);
          
          return GammaCdf;
      }
docs: Calculates the probability from 0 to X under Gamma Distribution
  
  @param x
  @param a
  @param b
  @return