Repository navigation
Take the real root in the sampled checks where the library's power takes it - #2092
Merged
Rafael-SOWNet merged 2 commits intoOct 23, 2026
Merged
Conversation
…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
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.
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:The change. Both tiers take the real root under the conditions
Number.Powdoes: 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 base68211405, 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-1and 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