Repository navigation
Gather a difference of logarithms into one in a limit - #2409
Merged
Rafael-SOWNet merged 2 commits intoNov 10, 2026
Merged
Conversation
ln(sin(x)) - ln(x) at 0 from the right is ln(sin(x) / x), which tends to 0, and was left unevaluated. At +oo, where the limit is taken, it is ln(sin(1/x)) - ln(1/x), a difference of two infinities whose ratio tends to 1, which settles nothing, and with no root for the conjugate. Two logarithms to one base, each a real constant times a logarithm, are now gathered into one where both antilogarithms are positive on the way: c log(a) + d log(b) = log(a^c b^d) holds exactly there. The sign is asked of each, and not inferred from the logarithm tending to a real infinity: ln(-x) at 0 from the right is read as -oo, and ln(x) - ln(-x) would have gathered into ln(-1) where it is -pi i. A constant factor or divisor is taken out of the difference first, since simplifying puts log(2, sin(1/x)) - log(2, 1/x) over ln(2). 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 #2409 +/- ##
=======================================
Coverage 86.80% 86.81%
=======================================
Files 312 312
Lines 69415 69444 +29
Branches 20271 20286 +15
=======================================
+ Hits 60257 60286 +29
Misses 4926 4926
Partials 4232 4232
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
feature/limit-of-a-difference-of-logarithms
branch
November 10, 2026 19:29
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.
ln(sin(x)) - ln(x)at 0 from the right was left unevaluated; it is 0.At an infinity, a difference of two logarithms of one base, each a constant multiple, is gathered into one logarithm,
log(b, f^m g^n), and that limit is taken. It is done only where both arguments are checked to be positive on the way (the limit ofsgnof each is 1). Reading positivity off each logarithm tending to-ooinstead gaveln(x) - ln(-x)the wrong sign, sinceln(-x)at 0⁺ is reported as-oo; with the sign check it stays as on master. A constant factor or divisor around the difference is peeled off first.ln(sin(x)) - ln(x)0(ln(sin(x)) - ln(x)) / x^2-1/6(ln(sin(x)) - ln(x)) / x0log(2, sin(x)) - log(2, x)02 ln(sin(x)) - ln(x^2)0ln(x) - ln(-x)-ln(-1)-ln(-1)Left and two-sided limits of these are unchanged. The rows are in
BREAKING-CHANGES.mdand inADifferenceOfLogarithmsIsGatheredTest.Measured: the unit tests (19268), the wrappers, AOT, and the eight harnesses pass; limitcheck over 42 seeds is identical to master's.
🤖 Generated with Claude Code