code: protected static double betinc(double x, double A, double B) {
          double A0=0.0;
          double B0=1.0;
          double A1=1.0;
          double B1=1.0;
          double M9=0.0;
          double A2=0.0;
          while (Math.abs((A1-A2)/A1)>0.00001) {
              A2=A1;
              double C9=-(A+M9)*(A+B+M9)*x/(A+2.0*M9)/(A+2.0*M9+1.0);
              A0=A1+C9*A0;
              B0=B1+C9*B0;
              M9=M9+1;
              C9=M9*(B-M9)*x/(A+2.0*M9-1.0)/(A+2.0*M9);
              A1=A0+C9*A1;
              B1=B0+C9*B1;
              A0=A0/B1;
              B0=B0/B1;
              A1=A1/B1;
              B1=1.0;
          }
          return A1/A; 
      }
docs: Internal function used by StudentCdf
  
  @param x
  @param A
  @param B
  @return