Repository navigation
Answer the indeterminate forms that are not quotients - #710
Merged
Rafael-SOWNet merged 1 commit intoAug 4, 2026
Merged
Conversation
Of the three indeterminate powers only 1^oo had a rule, the second remarkable limit. 0^0 and oo^0 reached the descent, which substitutes each part's own limit and hands back 0^0, that is NaN -- the claim that the limit does not exist. And a product of something vanishing with something diverging had no reading either, unless one of its factors happened to be written as a reciprocal. Both go over to e^(g * ln f) and to the diverging factor over the reciprocal of the vanishing one, which is the textbook move in each case. The exponent is asked as a limit of its own rather than rewritten in place. A rewrite would only hand the descent a product it reads no better than the power, since the descent substitutes the parts' limits and does not apply l'Hopital's rule to a part; asking outright is what puts the whole machinery behind it. Two guards, both from measurement rather than caution: The reciprocal split keeps precedence where it gives the rule a quotient it can use, since x * e^(-x) comes out as the clean x / e^x and inverting the other half instead does not terminate. But it can also hide the indeterminacy it was meant to expose -- tan(x) * ln(x) splits into sin(x) * ln(x) / cos(x), whose divisor tends to 1 -- so it is used only when what it produces is 0/0 or oo/oo. A base the library cannot differentiate is declined. Every route out of ln(f) runs through differentiating f, and a factorial's derivative wants the digamma function and comes back NaN, so lim x->+oo ((x!) / x^x)^(1/x) had no answer either way and took twenty seconds not to find one. x^x at 0 keeps having no two-sided limit, which is right rather than a gap: x^x is not real to the left of 0, so the 1 that comes back from that side is the complex continuation and not a limit to agree with. The suite pinned that already and it still holds. 19 of 20 measured cases, against 9 before. tan(x) * ln(x) is the one left: it arrives restructured as a quotient rather than a product, so the product reading never sees it. It is NaN on master too. 25 new tests; suite 4597 passed, 0 failed; corpus 111/117 with 0 wrong, 0 error and 0 timeout.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #710 +/- ##
==========================================
+ Coverage 80.99% 81.82% +0.82%
==========================================
Files 155 159 +4
Lines 13687 13854 +167
Branches 1957 2345 +388
==========================================
+ Hits 11086 11336 +250
+ Misses 1990 1861 -129
- Partials 611 657 +46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 of 3 tasks
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.
Of the three indeterminate powers, only
1^oohad a rule — the second remarkable limit.0^0andoo^0reached the descent, which substitutes each part's own limit and hands back0^0, that is NaN: the claim that the limit does not exist. A product of something vanishing with something diverging had no reading either, unless one of its factors happened to be written as a reciprocal.lim x->0+ x^sin(x)lim x->0+ sin(x)^xlim x->0+ x^(1/ln(x))lim x->0+ x^(2/ln(x))lim x->+oo (1/x)^(1/x)lim x->0+ sin(x)·ln(x)lim x->0+ sqrt(x)·ln(x)lim x->0+ x·cotan(x)lim x->0+ (1-cos(x))·cotan(x)19 of 20 measured cases against 9 before.
x^(1/ln(x))is the one worth naming:0^0is not always 1, which is the whole reason it is indeterminate, and here the exponent decides on e.How
Both families go over to the textbook form —
e^(g·ln f)for the power, and the diverging factor over the reciprocal of the vanishing one for the product.The exponent is asked as a limit of its own rather than rewritten in place. A rewrite would only hand the descent a product it reads no better than the power, because the descent substitutes each part's limit and does not apply l'Hopital's rule to a part. Asking outright is what puts the whole machinery behind it — my first attempt did rewrite in place, and it regressed
lim x->+oo x^(1/x)from 1 to NaN.Two guards, both from measurement
The reciprocal split keeps precedence, but only when it produces something usable.
x·e^(-x)splits into the cleanx/e^x, and inverting the other half instead does not terminate — so the split goes first. But it can also hide the indeterminacy it was meant to expose:tan(x)·ln(x)has been writtensin(x)/cos(x)·ln(x)by the time it arrives, and splitting givessin(x)·ln(x)/cos(x), whose divisor tends to 1. So the split is used only when what it produces is genuinely0/0oroo/oo.A base the library cannot differentiate is declined. Every route out of
ln(f)runs through differentiatingf, andFactorialf.InnerDifferentiatereturns NaN outright — the digamma function is not implemented. Without this guardlim x->+oo ((x!)/x^x)^(1/x)had no answer either way and took twenty seconds not to find one; it showed up as a timeout in a 117-problem corpus that had been at zero all along. Caught before this was opened, not after.What is deliberately unchanged
lim x->0 x^xstill has no two-sided limit, and that is right rather than a gap.x^xis not real to the left of 0, so the 1 that comes back from that side is the complex continuation and not a limit for the right-hand one to agree with.Limits.TestNoLimithas pinned this all along; an earlier draft of mine made the two-sided case answer 1 and broke that test, which was the test being correct and me being wrong.tan(x)·ln(x)at 0+ is the one measured case still missing. It arrives restructured as aDivfrather than aMulf, so the product reading never sees it. It is NaN on master too, so this is a gap rather than a regression, and the fix belongs with whatever handles the restructuring.Measurements
Failed: 0, Passed: 4597, Skipped: 14, Total: 4611, plus 127 F#.Independent of #703 and #709.