Repository navigation
A polynomial with no roots in closed form is answered with all of them - #2324
Merged
Rafael-SOWNet merged 1 commit intoNov 1, 2026
Merged
Conversation
Two defects lost roots of a polynomial equation with rational coefficients that no route writes in radicals. SolveMultiplicative solved an equation in powers of x through x to the least of its powers. x^5 - 30x^4 + 1 was written in t = x^4 with x^5 as t^(5/4), which is not x^5 off the positive reals, and x^4 - 3x^(5/2) + 2 in t = x^(5/2) with x^4 as t^(8/5), which lost two of its four roots. The substitution is now x to the greatest common divisor of the powers where they are rational, so each is a whole power of it, and none where that divisor is 1. Where they are not rational it is the least of them only when each is a whole multiple of it. And a polynomial reached Newton's method, which starts from points inside a bounded region and answered the roots it found there as though they were all: x^5 - 30x^4 + 1 = 0 has a root near 30 and was answered with one root of five. Before the search, a polynomial with rational coefficients is now given to the Durand-Kerner iteration that SumOverSet.NumericRoots already runs, which settles every root of each square-free part at once or answers nothing. It is numerical, so it runs only where Newton's method would: with AllowNewton off the answer is still analytical or the equation itself. Random integer polynomials of degree 5 to 8 against mpmath's polyroots (e387 polycheck, 200 each): at seed 5, 2.6.0 missed 51 roots in 15, master 6 in 4, and this none; at seed 6, 50 in 18, 17 in 12, and none. The radical cross-check's powers-of-x mode (200 at seed 31) goes from 2 roots missed to none, the two being roots of a degree-7 polynomial near 23 and -26. Its default mode (400 at seed 21) is unchanged: the same 39 sums of two radicals unsolved, nothing missed or wrong on either. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2324 +/- ##
==========================================
- Coverage 86.76% 86.75% -0.01%
==========================================
Files 312 312
Lines 68374 68388 +14
Branches 19885 19889 +4
==========================================
+ Hits 59325 59331 +6
- Misses 4891 4900 +9
+ Partials 4158 4157 -1
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-polynomial-with-no-closed-form-has-all-its-roots
branch
November 1, 2026 23:09
This was referenced Nov 1, 2026
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.
A polynomial equation with rational coefficients that no route writes in radicals could be answered with some of its roots:
x^5 - 30x^4 + 1 = 0came back with one root of five. Two defects did this.SolveMultiplicativesubstitutedxto the least of the powers.x^5 - 30x^4 + 1was written int = x^4, withx^5ast^(5/4), which is notx^5off the positive reals.x^4 - 3x^(5/2) + 2was written int = x^(5/2)and lost two of its four roots. The substitution is nowxto the greatest common divisor of the powers where they are rational, so each power is a whole power of it, and there is none where that divisor is 1. For irrational powers it is the least of them, and only where each is a whole multiple of it.SumOverSet.NumericRootsalready runs. It settles every root of each square-free part at once, or answers nothing. It is numerical, so it runs only where Newton's method would: withAllowNewtonoff, the answer is still analytical or the equation itself.Each fix alone leaves cases the other one removes, so they share a PR.
Random integer polynomials of degree 5 to 8, checked against mpmath's
polyroots, 200 per seed:The radical cross-check's powers-of-
xmode (200 at seed 31) goes from 2 roots missed to none. Those are the two #2323 left, roots of a degree-7 polynomial near 23 and -26. Its default mode (400 at seed 21) is unchanged: the same 39 sums of two radicals are left unsolved, and nothing is missed or wrong on either build.A root found by Durand–Kerner carries
MathS.Settings.DecimalPrecisionContext's digits, so a polynomial Newton's method did answer in full now has the same roots with more digits.BREAKING-CHANGES.mdhas an entry. Test:APolynomialWithNoClosedFormHasAllItsRootsTest; five of its six cases fail on master. The sixth checks thatx^6 + x^3 + 1is still answered exactly.One thing this exposed. On master without #2323, a spurious candidate from squaring twice reached the solution check, missing by 0.97% of its largest term, and was kept, because
RelativeResidualToleranceis 1%. That tolerance was set for Newton's double roots. With #2323 in, no case of it appears in these 1,000 equations, but a candidate found to 100 digits could be held to much less. I'll look at that separately.🤖 Generated with Claude Code