code: public static double fCdf(double x, int f1, int f2) {
          if(x<0 || f1<=0 || f2<=0) {
              throw new IllegalArgumentException("All the parameters must be positive.");
          }
          
          double Z = x/(x + (double)f2/f1);
          double FCdf = betaCdf(Z,f1/2.0,f2/2.0);
          
          return FCdf;
      }
docs: Calculates the probability from 0 to X under F Distribution
  
  @param x
  @param f1
  @param f2
  @return