Repository navigation
Read the logarithm of a power through the logarithm of its base in a limit - #2385
Merged
Merged
Conversation
…limit Nothing in a limit read ln(f^c), for a constant real c, as a multiple of ln(f). log(x, arcsin(x)^tan(1/2)) at 0, which is tan(1/2) from each side, was left unevaluated after 3.1 s from the right, 2.2 s from the left and 4.2 s two-sided, where log(x, arcsin(x)) was 1 at once. For f positive near the point, ln(f^c) is c ln(f). For f negative, f^c is (-f)^c (-1)^c on the principal branch, a positive number times one of modulus 1, so ln(f^c) is c ln(-f) + ln((-1)^c), which is c ln(f) only for c in (-1, 1]. In that range the first form holds wherever f is real, so a two-sided limit whose sides differ in sign is asked through it too. The rewrite runs beside the one that turns log(b, f) into ln(f) / ln(b). Measured, master against this branch, each alone: log(x, arcsin(x)^tan(1/2)) at 0+ unevaluated 3.1 s -> tan(1/2) 0.29 s the same two-sided unevaluated 4.2 s -> tan(1/2) 0.44 s ln(arcsin(x)^pi) / ln(x) at 0 unevaluated 2.7 s -> pi 1.1 s ln(sin(x)^(1/3)) / ln(x) at 0 1/3 2.4 s -> 1/3 0.23 s Found by limitcheck at DEPTH=3, SEED=65; no issue was filed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2385 +/- ##
==========================================
+ Coverage 86.78% 86.79% +0.01%
==========================================
Files 312 312
Lines 69129 69156 +27
Branches 20159 20166 +7
==========================================
+ Hits 59991 60022 +31
+ Misses 4920 4918 -2
+ Partials 4218 4216 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
added a commit
that referenced
this pull request
Nov 8, 2026
…#2387) Record the term-by-term product's changed answers Take a vanishing factor times a sum term by term in a one-sided limit From one side, a product whose factors tend to 0 and to an infinity, one of them a sum or a difference, is now asked as the sum of the products term by term, its whole limit once. Read as a product, l'Hopital's rule took x * (ln(-tanh(x)) + 1) at 0 from the left through nested limits for 4.5 s, where x ln(-tanh(x)) + x is 0 at once. The same gates as the quotient regrouping beside it: one-sided, and not while the sides of a two-sided limit are compared. x * (ln(-tanh(x)) + 1) at 0-: 4.5 s -> 0.44 s. e^(1/x) * (3 ln(-tanh(x)) + 1) at 0-: 7.2 s -> 0.46 s. (tanh(x)^3)^exp(1/x) at 0-: 7.5 s -> 0.47 s, the row the logarithm-of-a-power change (#2385) slowed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Nothing in a limit read
ln(f^c), for a constant realc, as a multiple ofln(f).log(x, arcsin(x)^tan(1/2))at 0, which istan(1/2)from each side, was left unevaluated after three seconds, wherelog(x, arcsin(x))is 1 at once.Where
fis positive near the point,ln(f^c)isc ln(f). Wherefis negative,f^cis(-f)^c (-1)^con the principal branch: a positive number times one of modulus 1. Soln(f^c)isc ln(-f) + ln((-1)^c), which equalsc ln(f)only forcin(-1, 1]. In that range the first form holds whereverfis real, whatever its sign, so a two-sided limit whose sides differ in sign is asked through it too. The rewrite runs next to the one that turnslog(b, f)intoln(f) / ln(b).log(x, arcsin(x)^tan(1/2))at 0+sin(1/2) / cos(1/2), 0.29 sln(arcsin(x)^pi) / ln(x)at 0pi, 1.1 sln(sin(x)^(1/3)) / ln(x)at 01/3, 2.4 s1/3, 0.23 sEach was measured alone on a build of each.
Found by limitcheck at
DEPTH=3,SEED=65, in the A/B of aSimplifychange that made this decline slower. No issue was filed.limitcheck A/B against master (
DEPTH=3, the usual seeds): eleven answers gained, none wrong, one slower.e^(1/2)^x / log(x^2, arctan(x))at -1-0, as from the rightNaN0log(log(x - 1, 1/2), log(abs(x), x^2))at -1--0.19160… - 0.22317…i, as from the rightNaNsqrt(x / 2)^(x^pi * x)at 0- and 0+1log(x^pi, sgn(-1))^2at 1- and 1+-ooNaN-oo(tanh(x)^erf(2))^sin(x^3)at 0- and 0+1The two-sided rows that were
NaNhad a left side master did not answer; it now agrees with the right. The held two-sided convention (x^xat 0 isNaN) does not move.One row moved from an answer to a timeout at the harness's 5 s cap:
(tanh(x)^3)^exp(1/x)at 0-. Alone it is1on both builds, 0.47 s on master and 7.2 s here. The rewrite hands one^(1/x) (3 ln(-tanh(x)) + 1), and master takes 7 s on that already: three samples put the time inApplyFirstRemarkableOverFactors, throughIsIndeterminateQuotient's nested limits into l'Hôpital's rule. That path is the next fix.Two rows changed only in printing.
tan(log(x^2, x^pi))at 0+ is the constanttan(pi/2), which does not exist: master's inner limit was a decimal ofpi/2and the harness compared its huge tangent; here it ispi / 2exactly, and the row is not a number. The other prints(-1) ^ (1/2 * ln(-1))where master printed(-1) ^ ln(i), the same value.Each new answer is in BREAKING-CHANGES.md, measured on 2.6.0. The full suite (19,100), the wrapper suites, AOT and the ten harnesses pass. This opens after #2384, which the rewrite ran into:
ln(x^3) / ln(2 + x)became3 ln(x) / ln(2 + x)and hung under a product.🤖 Generated with Claude Code