The current default step is pub const DEFAULT_STEP_SIZE: f64 = 0.00001;. It is too big for some functions. I would recommend a smaller value pub const DEFAULT_STEP_SIZE: f64 = 1.49e-8. You can find the magic value in a popular python library scipy: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.approx_fprime.html.