Skip to content

Claude/gaussian newton methods f p nsz#44

Open
hozblok wants to merge 7 commits into
masterfrom
claude/gaussian-newton-methods-fPNsz
Open

Claude/gaussian newton methods f p nsz#44
hozblok wants to merge 7 commits into
masterfrom
claude/gaussian-newton-methods-fPNsz

Conversation

@hozblok

@hozblok hozblok commented Jun 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 7 commits June 2, 2026 22:25
Ray r(t)=O+t*d reduces F(x,y,z)=0 to g(t)=F(O+t*d); all intersections are
the real roots of g on [t_min, t_max]. Pluggable backends behind RaySurface:
- sampling: safeguarded Newton/bisection reference oracle
- sturm: exact all-roots via interpolation, square-free, Sturm isolation;
  complex surfaces via gcd of Re g and Im g
- interval/chebyshev: placeholders for later phases

Reuses Solver.evaluate/get_derivative for g and grad F . d. Tests pending
local extension build.

https://claude.ai/code/session_015PRdmeBfg6J5JZdsAvXvRT
- Fix Newton divided-difference denominator (xs[i]-xs[i-j]) in interpolation
- Add Number.__neg__, .precision, .is_complex, .parts(), .wrap() public API
- Refactor backends to use the public Number API; pylint 10/10, isort clean
- All 12 intersection tests pass; full suite 739 passed

https://claude.ai/code/session_015PRdmeBfg6J5JZdsAvXvRT
g is fitted with a Chebyshev interpolant (Chebyshev-Gauss nodes), converted to
a monomial proxy, isolated via the shared Sturm machinery (_isolate.py), then
simple roots polished on the true g by Newton. auto now routes transcendental
real surfaces here instead of sampling. Captures even-multiplicity roots.

Extract _isolate.py (sturm_chain/variations/isolate/bisect/sign) shared by the
sturm and chebyshev backends. pylint 10/10; full suite 742 passed.

https://claude.ai/code/session_015PRdmeBfg6J5JZdsAvXvRT
- subdivision.py: adaptive Taylor-bound exclusion (|g(m)| <= |g'(m)|h + M2/2 h^2)
  with M2 estimated from g'; refines simple roots (rtsafe) and tangencies (g'=0),
  rejecting turning points where g != 0. Pure Python, real surfaces.
- Chebyshev now self-validates: escalates degree until the spectral tail
  converges, so oscillatory walls a low degree would miss are captured. Fit
  reduced to O(m^2).
- Move shared rtsafe into _isolate; sampling/subdivision reuse it.
- Tests: corrugated capillary wall x^2+y^2-(1+0.3 sin 4z)^2 (12 roots at k*pi/4),
  Chebyshev self-validation parity, tangent double roots, polynomial parity,
  complex-rejection. 21 intersection tests; full suite 748 passed.

https://claude.ai/code/session_015PRdmeBfg6J5JZdsAvXvRT
…rwise

auto now reconciles both general backends for non-polynomial real surfaces:
Chebyshev (precise on smooth roots) is backed up by subdivision (the safety
net), returning their deduped union so neither method's blind spot drops a
root. Drop the now-unused surface arg from get_backend.

Test: auto on the corrugated wall returns all 12 roots. Full suite 749 passed.

https://claude.ai/code/session_015PRdmeBfg6J5JZdsAvXvRT
Add a section covering the ray->g(t) reduction, the method table
(auto/sturm/chebyshev/subdivision/sampling), tangent-root recovery, complex
support via sturm, and the practical-vs-rigorous caveat for subdivision.

https://claude.ai/code/session_015PRdmeBfg6J5JZdsAvXvRT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants