Description
In class o.a.c.numbers.fraction.ContinuedFraction, method evaluate is declared as
public double evaluate(double x, double epsilon, int maxIterations)
Calling
cf.evaluate(x, eps, 1)
will raise an exception:
org.apache.commons.numbers.fraction.FractionException: maximal count (1) exceeded
At first sight, the check
if (n >= maxIterations) {
should rather be
if (n > maxIterations) {
However, it would also seem that the loop counter is wrong:
while (n < maxIterations) {
since setting maxIterations to 1 will in effect execute zero iteration...