Repository navigation
An odd root of a negative real is a preimage, as the evaluator takes it - #2313
Merged
Rafael-SOWNet merged 1 commit intoNov 1, 2026
Merged
Conversation
#212 states the sector the principal power z^p takes its values in, -p pi < arg <= p pi for 0 < p < 1, and leaves a root of x^p = v only where v is in it. The evaluator does not take every power as principal: a negative real to a rational power whose denominator is odd and below ten is the real root to the numerator, as Number.Pow's search for a good root finds it, so (-8)^(1/3) is -2. So x^(1/3) = -2, x^(1/5) = -2 and x^(-1/3) = -1/2, which 2.6.0 answered { -8 }, { -32 } and { -8 }, were answered { }, the value being outside the sector. With an odd numerator the negative reals are values as well, and the condition gains arg(v) = pi; a value known to be real is then always in range. With an even numerator a negative base has a positive power, (-8)^(2/3) = 4, so a positive value has the negative of its principal preimage as well: x^(2/3) = 4 is { 8, -8 }, where 2.6.0 had { 8 }. A denominator of ten or more, or an even one, is the principal power, as the evaluator's is. The test that pinned x^(1/3) = a as no root at a = -1 pinned this: (-1)^3 = -1, and (-1)^(1/3) is -1. Found by a cross-check of equations in square and cube roots against a Newton search. 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 #2313 +/- ##
==========================================
- Coverage 86.76% 86.76% -0.01%
==========================================
Files 311 311
Lines 68199 68216 +17
Branches 19821 19825 +4
==========================================
+ Hits 59175 59187 +12
- Misses 4881 4884 +3
- 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:
|
Rafael-SOWNet
deleted the
an-odd-root-of-a-negative-real-is-a-preimage
branch
November 1, 2026 16:20
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.
#212 (#2183) leaves a root of
x^p = vonly wherevis in the sector the principal power takes its values in,-p pi < arg <= p pifor0 < p < 1. The evaluator doesn't take every power as principal, though. A negative real to a rational power whose denominator is odd and below ten is the real root to the numerator, asNumber.Pow's search for a good root finds it, so(-8)^(1/3)is-2. The sector therefore dropped roots that 2.6.0 found and the evaluator confirms.Solve("x")x^(1/3) = -2{ -8 }{ }{ -8 }x^(1/5) = -2{ -32 }{ }{ -32 }x^(-1/3) = -1/2{ -8 }{ }{ -8 }x^(2/3) = 4{ 8 }{ 8 }{ 8, -8 }x^(1/3) = a{ a ^ 3 }… provided a = 0 or -1/3 * pi < arg(a) and arg(a) <= 1/3 * pior arg(a) = piarg(v) = pi, and a value known to be real needs no condition, or onlyv ≠ 0for a negative power.(-8)^(2/3) = 4, so a positive value also has the negative of its principal preimage.(-8)^(4/3) = 16likewise.x^(1/11) = -1andsqrt(x) = -2stay{ }.x^(1/3) = awith no root ata = -1. It now holds there, since(-1)^3 = -1and(-1)^(1/3)is-1. TheBREAKING-CHANGES.mdentry for Support parametric solutions #212 says so.{ }answers that A quartic that is biquadratic once depressed is solved #2314's quartic fix answers. Seven of the new cases fail on master. The suite, the trio, F#, AOT and the eight harnesses pass.Follows #2183, for #212.
🤖 Generated with Claude Code