Repository navigation
Give no limit to a quotient whose divisor is 0 near the point - #2379
Merged
Rafael-SOWNet merged 1 commit intoNov 7, 2026
Merged
Conversation
abs(x) - x is 0 for every positive x, so (abs(x) - x) / (abs(x) - x) has no value anywhere near 1, and l'Hopital's rule, whose premise is a divisor that is not 0 near the point, read it as 1. A divisor holding an abs or a sign is checked first: with each abs and sign read by the sign its argument keeps near the destination, does it simplify to 0? Nothing is sampled, since a sample can land on a zero. Where it does, the limit is NaN; two-sided, only where it does on both sides, since one side alone still approaches the point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2379 +/- ##
==========================================
+ Coverage 86.77% 86.78% +0.01%
==========================================
Files 312 312
Lines 69036 69053 +17
Branches 20134 20141 +7
==========================================
+ Hits 59907 59929 +22
+ Misses 4919 4914 -5
Partials 4210 4210
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/a-condition-that-fails-near-the-point
branch
November 7, 2026 05:50
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.
abs(x) - xis 0 for every positive x, so(abs(x) - x) / (abs(x) - x)has no value anywhere near 1, and its limit there does not exist. l'Hopital's rule assumes a divisor that is not 0 near the point, nothing checked that, and the limit came back as 1. 2.6.0 answered 1 too.A quotient whose divisor holds an abs or a sign is now checked first. Each abs and sign is replaced by the sign its argument keeps near the point, and if the divisor then simplifies to 0, the limit is NaN. Nothing is sampled, because a sample point can land on a zero by chance. A two-sided limit is NaN only where the divisor vanishes on both sides: where it is defined on one side, the point is still approached from that side.
(abs(x) - x) / (abs(x) - x)at 111NaN(abs(x) - x) * x / ((abs(x) - x) * sin(x))at 0, from the right11NaN(abs(x) - x) * x / ((abs(x) - x) * sin(x))at 0, from the left and two-sided111(abs(x) - x) / (abs(x) - x)at -1111Measured
DEPTH=3, across 39 seeds against master: nothing moved but one row atSEED=56,(cos(x) * sqrt(x)) ^ arctan(tanh(x))at 0+, which went from unevaluated to past the 5 s budget. Alone it takes 7.3-7.6 s and returns the same unevaluated limit on both builds, so it sits on the budget's edge either way.Found while reviewing #2378's cancellation condition; no issue was filed.
🤖 Generated with Claude Code