Repository navigation
Read the sign of a limit through a change of variable - #2395
Merged
Rafael-SOWNet merged 1 commit intoNov 9, 2026
Merged
Conversation
The sign of an expression that tends to 0 at an infinity was read through 1/x, at 0 from the right, and sinh(e^(-1/x)) is flat there: every derivative of e^(-1/x) vanishes at 0, so nothing had a sign for it and sgn(sinh(e^x)) at -oo was left unevaluated, as were floor and abs of such arguments. Where the variable is only inside one part u, the expression is h(u), and near the destination it has the sign h(t) has as t tends to the limit of u from the side u arrives from. sinh(e^x) at -oo is (e^t - e^-t) / 2 at 0 from the right, which has a slope. The side u arrives from is the sign of u - L, and that is skipped where it is the expression itself, which would recurse without end. Found by limitcheck; no issue was filed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2395 +/- ##
==========================================
- Coverage 86.81% 86.80% -0.01%
==========================================
Files 312 312
Lines 69228 69242 +14
Branches 20187 20193 +6
==========================================
+ Hits 60101 60108 +7
- Misses 4912 4916 +4
- Partials 4215 4218 +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
feature/sign-near-a-point-through-a-change-of-variable
branch
November 9, 2026 02:45
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.
In a limit, the sign of an expression
h(u)is now read through a change of variable when the variable appears only inside one partu. The sign near the destination is then that ofh(t)asttends to the limit ofu, from the sideuarrives from.Why. At an infinity, the sign of something that tends to 0 was read through
1/x, at 0 from the right. Theresinh(e^(-1/x))is flat, because every derivative ofe^(-1/x)vanishes at 0. Sosgn(sinh(e^x))at −oo was left unevaluated, andSignNear's own comment names that limit. Read throughu = e^x, it is(e^t - e^-t)/2at 0 from the right, which has a slope.The same reader settles a step function at a jump when the argument arrives through an inner function. For example,
tanh(x)reaches −1 from above at −oo, sofloor(tanh(x))there is −1.Termination. Each step recurses on a strictly smaller expression, except in one case: the side
uarrives from is asked as the sign ofu - L, and that question can be the expression itself.ln(1 + e^x)at −oo asks about(1 + e^x) - 1, whose ownu - Lis the same expression again. That recursion overflowed the stack in a first version. Such a part is now skipped, and the next one,e^x, answers.Measured
floor(tanh(x))at −oo. limitcheck flags one of them,sgn(sinh(e^x))at −oo = 1, as "another value". That is its double-precision sampling:e^(-10^4)underflows to 0, so its samples read the sign as 0.Tests:
ASignThroughAChangeOfVariableTesthas nine of the new answers, the case that overflowed, andsgn(sin(x))at +oo, which still declines.BREAKING-CHANGES.md has an entry. Found by limitcheck; no issue was filed.
🤖 Generated with Claude Code