6162636465666768697071
} }; final Secant secant = new Secant(); double root = secant.solve(f, accuracy, guess, xMin, xMax); if (Math.abs(1.0-root)> accuracy) { fail("expected: 1.0" + " but root is: " + root); }
7172737475767778798081
if(secant.getMaxEvaluations() != 100){ fail("expected: 100" + " but was: " + secant.getMaxEvaluations()); } root = secant.solve(f, accuracy, 0.01, 0.1); if (Math.abs(1.0-root)> accuracy) { fail("expected: 1.0" + " but root is: " + root); } }