Skip to content

Take the real root in the sampled checks where the library's power takes it - #2092

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
the-sampled-checks-take-the-real-root-the-power-takes
Oct 23, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
the-sampled-checks-take-the-real-root-the-power-takes

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The checks at sampled points take the real root where the library's power takes it. Fixes #2089.

The defect. Both interval tiers, doubles and then forty and eighty digits, took every power's principal branch. The library takes the real root for a negative real base and an exact exponent of odd denominator below 10: (-8)^(1/3) is -2 (#204). On the negative axis the check could therefore disagree with the values it checks:

var derivative = "(-x^3)^(1/3)".ToEntity().Differentiate(x);           // -x^2 (-x^3)^(-2/3)
derivative.Substitute(x, "1.43".ToEntity()).EvalNumerical();             // -1
PartialFractions.HoldsAtSampledPoints(derivative, "-1".ToEntity(), x);   // false before, true now

The change. Both tiers take the real root under the conditions Number.Pow does: the exponent an exact fraction in the tree, not whole, of odd denominator below 10, and the base's interval real and negative. An even denominator, a decimal exponent and a base off the real line keep the principal branch, as the library's power does.

Measured on Rubi's suite, with the harness that reads GAMMA, against this branch's base 68211405, the whole corpus each side: 48,907 solved on both, 0 rows moved, 0 wrong. Time per stream is 1.017, 1.010 and 1.003 of the base's, and allocation 1.0001 in each.

Tests: the interval holds the real root's value in both tiers, (-8)^(1/3) + (-2)^(2/5) and (-3/2)^(-4/7) + (-5)^(1/2), and the derivative above holds against -1 and not against -1 + 1/1000. The suite passes (16,948), and so do the MCP tests (329).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…kes it

The checks at sampled points evaluate both sides in intervals, doubles and then forty and eighty
digits, and both tiers took every power's principal branch. The library takes the real root for a
negative real base and an exact exponent of odd denominator below 10: (-8)^(1/3) is -2 (#204). So
on the negative axis the check could disagree with the values it was checking. The derivative of
(-x^3)^(1/3) is -x^2 (-x^3)^(-2/3), which is -1. At the points right of 0 the check read it as
-e^(-2 i pi/3), and turned the right answer away. Equally it could accept an answer that is right
only on the principal branch, where the library's value is another.

Both tiers now take the real root under the conditions Number.Pow takes it: the exponent an exact
fraction in the tree, not whole, of odd denominator below 10, and the base's interval real and
negative. An even denominator, a decimal exponent and a base off the real line keep the principal
branch, as the library's power does.

Fixes #2089.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…t resolve as a cref

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit 92227d9 into master Oct 23, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 23, 2026
Rafael-SOWNet added a commit that referenced this pull request Oct 23, 2026
…s it (#2099)

The precise evaluation read gamma(a, z) with its order as a decimal, which is the principal branch
on the negative axis. The function itself takes the power's real root there for an exact order of
odd denominator below 10, as the sampled checks' powers now do (#2092): gamma(1/3, -2) is 10.21,
and the check read it as complex. Such an order is now handed to the function as it is written.

Part of #2075.


Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

The checks at sampled points take a power's principal branch where the library takes the real root

1 participant