samhocevar / lolremez

📈 Polynomial Approximations using the Remez Algorithm
Do What The F*ck You Want To Public License
397 stars 36 forks source link

Replace regular falsi with modified versions #14

Closed ghost closed 3 years ago

ghost commented 3 years ago

I've implemented a few different modifications of the regula falsi algorithm, namely the ones described in the following papers: dx.doi.org/10.1007/BF01934364 https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.8676 From my testing, the Pegasus algorithm seems slightly faster than the Illinois algorithm, which is on par with Method 4 of the second paper. It seems 2-5x faster than interval bisection depending on the input, with guaranteed superlinear convergence by avoiding the trap of one endpoint remaining unmodified.

samhocevar commented 3 years ago

Thanks. I have merged your PR in a separate branch for now, because I would like to add the possibility of choosing the root finding method at runtime before I merge it into master.

samhocevar commented 3 years ago

@Clanmaster21 thanks again, the code is now live in the master branch and you can use the --bisect, --regula-falsi, --pegasus, --illinois, and --ford flags to test different methods. The default is Pegasus.