Repository navigation
Halve a sign change down to the root before Newton's method polishes it - #2331
Merged
Rafael-SOWNet merged 1 commit intoNov 2, 2026
Merged
Conversation
Newton's method, which Solve falls back to, also starts from each bracket
where the expression changes sign along the real line, and it started
from the bracket's midpoint. (x^2 - 3x - 3)^(1/3) + sqrt(3x - 4) = 3 has
its one real root at 3.79617, just past the cube root's zero at 3.79129,
where the slope is unbounded. From the midpoint 3.7 the iteration left the
real line, the root was never answered, and over the reals the answer was
{ }, which claims there is none.
The bracket is now halved down to the root in double precision, and Newton
starts from there. A pole between the two ends is halved down to as well,
and its value rejects it as before: 1/x = 0 is still { }.
radcheck, 400 random radical equations at seed 51: 1 missed root on
master, 0 here; seeds 22 and 53 (pow) are the same on both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2331 +/- ##
==========================================
+ Coverage 86.75% 86.76% +0.01%
==========================================
Files 312 312
Lines 68447 68457 +10
Branches 19909 19913 +4
==========================================
+ Hits 59379 59396 +17
+ Misses 4908 4903 -5
+ Partials 4160 4158 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
deleted the
a-sign-change-is-bisected-before-newton-polishes-it
branch
November 2, 2026 15:11
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.
Found by a radical-equation cross-check at a seed not used before. No issue was filed.
(x^2 - 3x - 3)^(1/3) + sqrt(3x - 4) = 3has one real root, 3.7961670056822382, checked with mpmath at 40 digits.Solveanswered only the complex pair1.3099 ± 2.3063i. Over the reals it answered{ }, which claims there is no root. 2.6.0 answered the same.The equation goes to Newton's method, which also starts from each bracket where the expression changes sign along the real line. It started from the bracket's midpoint, here 3.7. The root lies just past the cube root's zero at 3.79129, where the slope is unbounded, and from 3.7 the iteration left the real line.
The bracket is now halved down to the root in double precision before Newton polishes it. A pole between the two ends is halved down to as well, and its value rejects it as before, so
1/x = 0is still{ }.pow(600)Tests: both tests in
ARootPastARadicandsZeroTestfail on master. There is a BREAKING entry, A real root just past where a radical's argument changes sign is found.🤖 Generated with Claude Code