Repository navigation
A limit of a logarithm that is not decided is left unevaluated - #2278
Merged
Rafael-SOWNet merged 1 commit intoOct 31, 2026
Merged
Rafael-SOWNet merged 1 commit into
Rafael-SOWNet merged 1 commit into
Conversation
limit(ln(2 + sin(x)), x, +oo) overflowed the stack. A limit node simplifies its expression evaluated, in which ln(f) is log(2.718..., f). ExpandLogarithm wrote every base but the symbol e as a quotient, ln(f) / ln(2.718...), and the first remarkable limit asks whether its numerator vanishes through a limit node of ln(f), which is evaluated, and so asks the same question again. Where the limit of ln(f) is decided that ends; where it is not, it did not. ExpandLogarithm now reads a base that is e evaluated as e, and writes the logarithm as ln(f) rather than as a quotient. UndecidedLogarithmLimitTest takes five limits of logarithms of oscillating arguments, which must come back unevaluated or NaN, and three decided ones. On master the test host crashes with a stack overflow on the first five. The suite, the trio, F#, AOT and the eight harnesses pass. Fixes #2273. 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 #2278 +/- ##
==========================================
- Coverage 86.72% 86.71% -0.02%
==========================================
Files 310 310
Lines 67841 67846 +5
Branches 19689 19690 +1
==========================================
- Hits 58834 58830 -4
- Misses 4891 4895 +4
- Partials 4116 4121 +5
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-limit-of-a-logarithm-that-is-not-decided-is-left-unevaluated
branch
October 31, 2026 01:34
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.
limit(ln(2 + sin(x)), x, +oo)overflowed the stack and took the process down, in 2.6.0 and on master.The cycle:
ln(f)becomeslog(2.718..., f).ExpandLogarithmwrote every base except the symboleas a quotient,ln(f) / ln(2.718...).ln(f). That node is evaluated, so the same question is asked again.When the limit of
ln(f)is decided, the loop ends. When it is not, it never did.ExpandLogarithmnow reads a base that ise, evaluated, ase.limit(ln(2 + sin(x)), x, +oo)limitright(ln(sin(1/x) + 2), x, 0)UndecidedLogarithmLimitTest: on master the test host crashes with a stack overflow. The suite (18,251), the trio, F#, AOT and the eight harnesses pass locally.Found while working on the branch-cut half of #2266. Declining a limit there made the same cycle reachable from
ln(x^x), so that fix waits for this one.Fixes #2273.
🤖 Generated with Claude Code