### Question:
IncompleteGammaFunction implements Function<Double, Double> { @Override public Double apply(Double x) { try { return Gamma.regularizedGammaP(_a, x, _eps, _maxIter); } catch (MaxCountExceededException e) { throw new MathException(e); } } IncompleteGammaFunction(double a);  IncompleteGammaFunction(double a, int maxIter, double eps); @Override Double apply(Double x);  }### Answer:
@Test public void testLimits() { assertThat(FUNCTION.apply(0.)).isCloseTo(0, offset(EPS)); assertThat(FUNCTION.apply(100.)).isCloseTo(1, offset(EPS)); }
@Test public void test() { final Function<Double, Double> f = new Function<Double, Double>() { @Override public Double apply(final Double x) { return 1 - Math.exp(-x); } }; final double x = 4.6; assertThat(f.apply(x)).isCloseTo(FUNCTION.apply(x), offset(EPS)); }