Repository navigation
A polynomial is not answered with no roots - #2317
Merged
Merged
Conversation
Every root a solver finds is put back into the equation as written, and the ones that fail
are dropped. Where all of them failed, the empty set was left, and the empty set claims
there is no root. For a polynomial of degree one or more, read over the complex numbers,
that is never true, so what failed was the solver: (x + 1)^3 = 2 came back { } while
Cardano's C was 0 for a shifted cube (#2315), and 31x^4 - 62x^3 + 33x^2 - 2x - 1 = 0 while a
biquadratic quartic was shifted by -b a / 4 (#2314). Such a polynomial is now left as the
set of the x that satisfy it, which claims only that its roots were not found.
Only a polynomial with numbers for coefficients and over the complex numbers: an equation
that is not a polynomial can have no root, as sqrt(x) = -1 has none, and so can a
polynomial over the reals.
With those two fixed, no equation known reaches this, so nothing answered changes.
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 #2317 +/- ##
==========================================
- Coverage 86.76% 86.75% -0.02%
==========================================
Files 311 311
Lines 68216 68225 +9
Branches 19827 19832 +5
==========================================
- Hits 59191 59189 -2
- Misses 4882 4891 +9
- Partials 4143 4145 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Every root a solver finds goes back into the equation as written, and the ones that fail are dropped. Where all of them failed, the empty set was left, and the empty set claims there's no root. For a polynomial of degree one or more over the complex numbers that is never true, so what failed was the solver. Such a polynomial is now left as the set of the
xthat satisfy it, which claims only that its roots weren't found.Solve("x"), with neither #2314 nor #2315(x + 1)^3 = 2{ }{ x : (x + 1) ^ 3 = 2 }31x^4 - 62x^3 + 33x^2 - 2x - 1 = 0{ }{ x : 31 * x ^ 4 - … = 0 }sqrt(x) = -1{ }{ }: not a polynomial, and it has no rootx^2 + 1 = 0.{ }answers above come from defects A quartic that is biquadratic once depressed is solved #2314 and A cube shifted is solved #2315 fix, and with those merged no equation I know of reaches this, so no answer changes and there's noBREAKING-CHANGES.mdentry. It turns the next such defect into "unsolved" rather than a wrong answer. The tests askWithoutSpuriousRootsdirectly, with candidates that fail.No issue was filed.
🤖 Generated with Claude Code