Repository navigation
Read a power of a power of a positive base in a limit as one power - #2398
Merged
Merged
Conversation
(g^a)^b, with a and b real constants, is g^(a b) wherever g is positive, and in a limit nothing read it so. Read as written, sqrt(x^3) / x at 0 from the right came out 0 only after four seconds of l'Hopital's rule, each step another root over a power, and floor(sqrt(x^3)) took six, asking it for the sign of sqrt(x^3). The power is now merged in front of the descent, beside the logarithm of a power, where g is positive near the point on each side approached. Where g is negative the two differ -- sqrt(x^3) is i |x|^(3/2) for x < 0 and x^(3/2) is -i |x|^(3/2) -- so from the left and from both sides nothing changes. An integer outer exponent is left to the normalisation. Found by limitcheck; no issue was filed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2398 +/- ##
=======================================
Coverage 86.81% 86.81%
=======================================
Files 312 312
Lines 69265 69272 +7
Branches 20201 20202 +1
=======================================
+ Hits 60131 60140 +9
+ Misses 4916 4914 -2
Partials 4218 4218
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.
(g^a)^b, withaandbreal constants, equalsg^(a b)wherevergis positive, but nothing in a limit read it that way. Read as written,sqrt(x^3) / xat 0 from the right came out 0 only after 4 s of l'Hopital's rule, each step another root over a power.floor(sqrt(x^3))andsgn(sqrt(x^3))took longer still, because they ask that limit for the sign ofsqrt(x^3).The fix. The power is merged in front of the descent, beside the existing logarithm-of-a-power rewrite, where
bis not an integer andgis positive near the point on every side approached. Wheregis negative the two differ:sqrt(x^3)isi |x|^(3/2)forx < 0, andx^(3/2)is-i |x|^(3/2). So limits from the left, and two-sided limits of such a root, are read as before. An integer outer exponent is left to the normalisation.Measured on master (567890f) and this branch. The answers are the same; only the time changes:
floor(sqrt(x^3))at 0+sgn(sqrt(x^3))at 0+sqrt(x^3) / xat 0+sqrt(x^3) / xat 0, two-sidedsgn(sqrt(x^5))at 0+One answer changes against 2.6.0 and master:
sinh(arctan(x))^sqrt(x * x)at 0+ is now1, in 0.3 s. Both 2.6.0 and master leave it unevaluated after 3.5 s. A BREAKING-CHANGES entry records it.limitcheck, 42 seeds at depth 3 with 600 expressions each, against master: that one limit gained, and no losses, wrong answers or new timeouts.
Checks: the full suite passed (19191 tests), as did the MCP, terminal, interactive and F# wrapper suites, the AOT build and the eight harnesses.
New test:
APowerOfAPowerIsOnePowerTest. It includes the left-side and two-sidedfloor(sqrt(x^3)), which are asserted to stay unevaluated.🤖 Generated with Claude Code