/** * {@inheritDoc} * @throws MathException If the Commons method could not evaluate the function; * if the Commons method could not converge. */ @Override public Double getRoot(Function<Double, Double> function, Double xLow, Double xHigh) { checkInputs(function, xLow, xHigh); UnivariateFunction wrapped = CommonsMathWrapper.wrapUnivariate(function); try { return _ridder.solve(MAX_ITER, wrapped, xLow, xHigh); } catch (TooManyEvaluationsException | NoBracketingException e) { throw new MathException(e); } }