final int maxEval = 1000;
// Very small absolute tolerance to rely solely on the relative
// tolerance as a stopping criterion
final MultivariateOptimizer optim = new PowellOptimizer(relTol, 1e-100);
final PointValuePair funcResult = optim.optimize(maxEval, func, GoalType.MINIMIZE, init);
final double funcValue = func.value(funcResult.getPoint());
final int funcEvaluations = optim.getEvaluations();
final double scale = 1e10;
final MultivariateFunction funcScaled = new MultivariateFunction() {