Repository navigation
A quotient of logarithms is differentiated only where both diverge - #2275
Merged
Rafael-SOWNet merged 1 commit intoOct 31, 2026
Merged
Rafael-SOWNet merged 1 commit into
Rafael-SOWNet merged 1 commit into
Conversation
limitright(ln(x) / ln(cos(x)), x, 0) was -oo, where it is +oo: -oo over a divisor vanishing from below. SolveAsLogarithmDivision applies l'Hopital's rule where both logarithms diverge, and read that off the form of each argument's limit: an infinity anywhere in it, or 0. The limit of cos(1/x) comes back as cos(1 / +oo), which has an infinity in it and is 1, so ln(cos(x)) was taken to diverge, and the derivatives' ratio (1/x) / (-tan(x)) answered -oo. LogarithmDiverges reads a limit that evaluates to a finite number by its value, where only 0 diverges, and anything else by its form as before. LogarithmQuotientLimitTest takes twelve limits that must be answered and two that may be declined, each checked against values near the destination. Eleven fail on master. The suite, the trio, F#, AOT and the eight harnesses pass. limit(ln(x^2) / ln(cos(x)), x, 0) moves from -oo to NaN, where both sides are +oo: the two-sided path's NaN is #2274. Fixes #2267. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2275 +/- ##
==========================================
- Coverage 86.72% 86.71% -0.01%
==========================================
Files 310 310
Lines 67833 67845 +12
Branches 19685 19690 +5
==========================================
+ Hits 58826 58835 +9
Misses 4890 4890
- Partials 4117 4120 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
deleted the
a-logarithm-quotient-is-differentiated-only-when-both-diverge
branch
October 31, 2026 00:37
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 31, 2026
limitright(ln(x^x), x, -1) was ln(-1), which is i pi, where it is -i pi: x^x comes to -1 from below as x comes down to -1, and the principal logarithm is continuous on its cut from above only. The value on the cut is the limit along the real line and from above, so it was given as the limit from either side. ArrivesOnTheCutOffTheRealLine asks whether a logarithm's argument, or the base of a power to an exponent that is not whole, tends to a negative real and is not known to be real on the approach; a power's base and a logarithm's argument count as positive where their values at the destination are. Which side such an argument comes from is not decided, so a limit there is declined: by substitution, by the logarithm's and the power's descent, by SolveAsLogarithm, by the quotient of logarithms, and by Gruntz, whose series took the principal logarithm of a negative coefficient. A limit from above, whose answer was right, is declined too. LimitOnABranchCutTest takes eight limits from below the cut, three two-sided ones that do not exist, and nine along the real line, which are answered as before; eleven fail on master. The suite, the trio, F#, AOT and the eight harnesses pass. Composed with #2268, #2275 and #2276, work/limitcheck finds none of the 56 limits it found answered with another value on master, of 600 expressions. Part of #2266. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 31, 2026
) limit(ln(x^2) / (cos(x) - 1), x, 0) was NaN, the claim that there is no limit, where it is +oo from both sides. Each side's descent put the parts' limits in place of the parts and read (-oo) / 0, which says nothing about the side the divisor vanishes from and is NaN, and DivergesAtAVanishingDivisor, which reads that side, asked for a finite dividend. An infinity with a sign over a divisor vanishing from one side is no more indeterminate than a number is: it is the infinity of the two signs' product. The rule now takes one. AnInfinityOverAVanishingDivisorTest takes four two-sided limits that were NaN, four one-sided and two-sided ones that were answered and are unchanged, and three that have no limit and stay NaN, x^x at 0 among them; the four fail on master. The suite, the trio, F#, AOT and the eight harnesses pass. #2275's entry for ln(x^2) / ln(cos(x)) now reads +oo. The issue put the cause at WhereBothSidesAgree's real-codomain gate. Opening the gate changed nothing: each side was still (-oo) / 0. Fixes #2274. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
limitright(ln(x) / ln(cos(x)), x, 0)was-oo, where it is+oo:-ooover a divisor vanishing from below.SolveAsLogarithmDivisionapplies l'Hopital's rule where both logarithms diverge, and decided that from the form of each argument's limit: an infinity anywhere in it, or 0. The limit ofcos(1/x)comes back ascos(1 / +oo), which contains an infinity and is 1, soln(cos(x))was taken to diverge.LogarithmDivergesreads a limit that evaluates to a finite number by its value, where only 0 diverges, and anything else by its form, as before.limitright(ln(x) / ln(cos(x)), x, 0)-oo+oolimitright(ln(sin(x)) / ln(cos(x)), x, 0)-oo+oolimit(ln(x^2) / ln(cos(x)), x, 0)-ooNaN, still wrong; both sides are+oo, see #2274LogarithmQuotientLimitTesthas twelve limits that must be answered and two that may be declined, each checked against values near the destination. 11 of the 14 fail on master. The suite (18,243), the trio, F#, AOT and the eight harnesses pass locally.Two more defects turned up on the way: #2271, a quotient of logarithms with symbolic limits, and #2274, the two-sided NaN above.
Fixes #2267.
🤖 Generated with Claude Code