[SciPy-Dev] Use more common Halley's method instead of parabolic variant

Mark Mikofski bwana.marko at yahoo.com
Mon Feb 26 20:43:46 EST 2018


Hi All,
I would like to propose that we change the form of the Halley's method in scipy.optimize.zeros from the "parabolic" variant currently in use (see https://de.wikipedia.org/wiki/Halley-Verfahren from issue #5922 https://github.com/scipy/scipy/issues/5922 ) with the more common form found in several other popular libraries and references (see list at end of email). I think that there are at least four advantages to using the more common form: (1) the parabolic variant has an unnecessary branching condition, which makes the file easier to read, understand and maintain, (2) the proposed changes actually make the `zeros.py` file smaller by removing about 5 lines, (3) the common form seems to have more documentation and widespread usage, so it is easier to find, and should increase confidence in it's usage, and (4) without branching conditions, it is easier to vectorize these methods, so that they can process numerous scalar, univariate cases simulataneously using numpy arrays or in a tight cythonized loop, with exit conditions that are similar to the multivariate case: (a) if derivatives are badly conditioned, then exit or (b) if absoluate max of all of the Newton steps is less than a given tolerance.  

I have made my proposed changes in PR #8489 https://github.com/scipy/scipy/pull/8489


List of libraries and references using the more common form of Halley's method: (1) Boost (http://www.boost.org/doc/libs/1_62_0/libs/math/doc/html/math_toolkit/roots/roots_deriv.html#math_toolkit.roots.roots_deriv.halley), (2) the English language Wikipedia (https://en.wikipedia.org/wiki/Halley%27s_method), (3) Wolfram's (http://mathworld.wolfram.com/HalleysMethod.html), (4) JuliaLang  Roots.jl (https://github.com/JuliaMath/Roots.jl/blob/master/src/newton.jl#L111), and (5) the R pracma package in newton.R (https://cran.r-project.org/web/packages/pracma/index.html)


Thank you very much for your consideration!
Sincerely,Mark Mikofski




“As I breath in, I calm my body, as I breath out, I smile” - Thich_Nhat_Hanh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180227/2960adea/attachment-0001.html>


More information about the SciPy-Dev mailing list