evaluateDerivativeOn method
Evaluates the derivative of the function on the given x
value.
Implementation
num evaluateDerivativeOn(double x) {
final h = math.pow(1.0e-15, 1 / 3) * x;
final upper = evaluateOn(x + h);
final lower = evaluateOn(x - h);
return (upper - lower) / (2 * h);
}