Repository navigation
Take the power's branch in the incomplete gamma function - #2080
Merged
Rafael-SOWNet merged 1 commit intoOct 22, 2026
Merged
Conversation
gamma(a, z) took the principal branch of z^a everywhere, and the power takes the real root of a negative base for an exact exponent of odd denominator below 10 (SimplificationContract section 6). So on the negative axis, for such an a, the function's derivative -z^(a - 1) e^(-z), whose power takes the real root, was not the derivative of its value: the difference quotient of gamma(1/3, z) at z = -2 was the derivative turned by e^(-2 i pi/3). An antiderivative written in the function had the values of one turned the same way; with the next integration rule, the integral of e^(x^3) from 1 to 2 came out -137.8 plus an imaginary part, where it is 275.5, and differentiating back did not show it. Gamma(a, z) is Gamma(a) - z^a g(a, z) with g entire, and its z^a is now the power's: rho = (-1)^p e^(-i pi p/q) times the principal one, which makes the value real. gamma(1/3, -2) is 10.2125..., DLMF 8.7.3's sum with the real root at 90 digits. The conventions table records it, with the bound below 10 that it did not: (-8)^(1/11) is principal. Part of #2075; see #204. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This was referenced Oct 22, 2026
Merged
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.
Makes
gamma(a, z)take the branch ofz^athe power takes, so that its derivative is the derivative of its value everywhere. Part of #2075; see #204.What was wrong. The function took the principal branch of
z^a. The power takes the real root of a negative base for an exact exponent of odd denominator below 10 (SimplificationContract §6). So on the negative axis, for such ana, the derivative-z^(a - 1) e^(-z)read the real root while the value was principal. The difference quotient ofgamma(1/3, z)atz = -2was the derivative turned bye^(-2iπ/3).Every antiderivative written in the function inherits that, and differentiating back cannot see it, because the symbolic derivative is consistent with itself. With the next integration rule,
∫₁² e^(x^3) dxcame out-137.76 + …i, where quadrature gives 275.51.The fix.
Gamma(a, z) = Gamma(a) - z^a g(a, z)withg(a, z) = Σ_k (-z)^k/(k! (a + k))entire (DLMF 8.7.3). Itsz^ais now the power's,ρ = (-1)^p e^(-iπp/q)times the principal one:ρgoes into the prefactor.(P + 5) ln 10, where it is(1 - ρ) Gamma(a) + ρtimes the principal value, with nothing to cancel.c73cc681, the principal branchgamma(1/3, -2)-1.08786823 - 6.524300699i10.212552064243320672…10.212552064243320672…gamma(2/3, -4)20.48002493 - 33.12704266i-36.897696051078160810…-36.897696051078160810…gamma(-1/3, -300)-4.857661756e126 + 8.413716968e126i9.7153235129376790359…e1269.7153235129376790359…e126gamma(1/2, -3), even denominatorgamma(1/11, -2), denominator past 10(-8)^(1/11)isSimplificationContract §6's table now has a row for
gamma(1/3, -2). It also gets the bound below 10, which it did not record:(-8)^(1/11)is1.1592 + 0.3404i, measured on this build.MathS.IncompleteGammaand the breaking entry say which branch the function takes, replacing #2078's note that the derivative disagreed.The suite passes (16,895) and so do the MCP tests (329). The new tests pin the four values above against the 90-digit sum, and assert that the derivative on the cut is the difference quotient of the value. That test fails on master, where the quotient is not even real. No integrand in Rubi's corpus holds the function, so the shared harness cannot move.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura