Numerical differentiation with a complex step

from blog John D. Cook, | ↗ original
The most obvious way to approximate the derivative of a function numerically is to use the definition of derivative and stick in a small value of the step size h. f′ (x) ≈ ( f(x + h) − f(x) ) / h. How small should h be? Since the exact value of the derivative is the […] The post Numerical differentiation with a complex step first appeared on John...