kmolan / multicalc-rust

Multivariable calculus in pure rust
MIT License
40 stars 0 forks source link

give it a smaller default step in the numerical diff #3

Open eweca-d opened 4 weeks ago

eweca-d commented 4 weeks ago

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.

kmolan commented 4 weeks ago

Noted. I'm currently doing a big refactor so this change will take some time. Thank you again for all your contributions!