Repository navigation
Add multivariate Newton and Cuyt's multivariate Halley root finders - #1620
Merged
Merged
Conversation
One LU of J serves both solves; F''[a, a] comes from a user closure. Line search on |F|^2. Closes #1616 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NAThompson
force-pushed
the
multivariate-roots
branch
from
November 3, 2026 03:00
3f4e63c to
f34d81e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tools::multivariate_newtonandtools::multivariate_halleyinboost/math/tools/multivariate_roots.hppfor systems F(x) = 0.f(x)returns(F, J), or(F, J, d2)for Halley, whered2(v)= F″(x)[v, v], so the n³ tensor is never formed. Halley is Cuyt's Padé form: with a = −J⁻¹F and b = J⁻¹F″[a, a], xᵢ += aᵢ² / (aᵢ + bᵢ/2), with one LU factorization serving both solves (Cuyt & Van der Cruyssen 1983; Cuyt & Rall, ACM TOMS 1985). Both use a backtracking line search on ½‖F‖²; a singular J or a failed line search raises an evaluation error. Also bound in the nanobind layer;example/multivariate_roots_ellipse.cppgets J and F″[v, v] from forward-mode autodiff.Closes #1616
Newton doubles the digits per step and Halley triples them (cpp_bin_float_50):

Basins of z³ = 1 as a real 2-D system. Componentwise Halley is not complex Halley: undamped, its basin boundaries are wilder than Newton's; the line search tames both, and Halley needs 28% fewer iterations.

Every pixel solves a 3×3 ray–torus system:

google/benchmark (
reporting/performance/multivariate_roots_performance.cpp, Apple clang -O2 arm64):Limitations: the LU is dense; the componentwise quotient is not affine-invariant; a line search along the Newton direction creeps through curved valleys (253 Newton iterations on the Rosenbrock gradient).
🤖 Generated with Claude Code