Beta { public static double regularizedBeta(double x, double a, double b) { return regularizedBeta(x, a, b, DEFAULT_EPSILON, Integer.MAX_VALUE); } private  Beta(); static double regularizedBeta(double x, double a, double b); static double regularizedBeta(double x,
                                         double a, double b,
                                         double epsilon); static double regularizedBeta(double x,
                                         double a, double b,
                                         int maxIterations); static double regularizedBeta(double x,
                                         final double a, final double b,
                                         double epsilon, int maxIterations); @Deprecated static double logBeta(double a, double b,
                                 double epsilon,
                                 int maxIterations); static double logBeta(final double p, final double q);  }
@Test public void testRegularizedBetaTinyArgument() { double actual = Beta.regularizedBeta(1e-17, 1.0, 1e12); TestUtils.assertEquals(9.999950000166648e-6, actual, 1e-16); }
@Test public void testMath1067() { final double x = 0.22580645161290325; final double a = 64.33333333333334; final double b = 223; try { Beta.regularizedBeta(x, a, b, 1e-14, 10000); } catch (StackOverflowError error) { Assert.fail("Infinite recursion"); } }