int maxIterations = 100;
int retries = 5;
for (int i = 1; i <= retries && !interrupt; i++) {
try {
BracketFinder bracketFinder = new BracketFinder(growthLimit,
maxIterations);
bracketFinder.search(function, goal, min, max);
BrentOptimizer extremaFinder = new BrentOptimizer();
extremeTime = extremaFinder.optimize(function, goal,
bracketFinder.getLo(), bracketFinder.getHi(),
bracketFinder.getMid())
+ zeroPoint; // TODO: or - zeroPoint?
extremeMag = extremaFinder.getFunctionValue();
} catch (FunctionEvaluationException e) {