public double evaluate(double x) throws NumericException {
return erf(x) - y;
}
};
Bracket b = new Bracket(f);
double[] bracket;
if (y > 0) {
bracket = b.bracketOut(0.0, y, Double.POSITIVE_INFINITY);
} else {
bracket = b.bracketOut(Double.NEGATIVE_INFINITY, y, 0.0);
}
BisectionRootFinder bisection = new BisectionRootFinder(f);
ret = bisection.findRoot(bracket[0], bracket[1]);
}