Repository navigation
Read a tangent, an error function and a step function as real when a limit's sides are compared - #2418
Merged
Rafael-SOWNet merged 1 commit intoNov 13, 2026
Conversation
…limit's sides are compared A two-sided limit compares its sides where the expression is real on both, and the structural reading of that knew a sine, a cosine and an arctangent but not a tangent, an arccotangent, the error functions or the step functions, all real for a real argument. Where the descent read a side as 0 * oo the limit was NaN, which says it does not exist: (pi^2 + 1/(2x)) erf(x) at 0 is 1/sqrt(pi) from each side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2418 +/- ##
==========================================
+ Coverage 86.80% 86.81% +0.01%
==========================================
Files 312 312
Lines 69503 69514 +11
Branches 20300 20300
==========================================
+ Hits 60329 60347 +18
+ Misses 4940 4934 -6
+ Partials 4234 4233 -1
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/real-functions-agree-on-both-sides-in-a-limit
branch
November 13, 2026 08:40
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.
A two-sided limit at a finite point compares the limits from each side. When a side's descent comes back NaN, the comparison asks each side outright. Outside a real codomain, it does that only if the expression is real on both sides of the point, which is decided by reading its structure. That reading knew the sine, the cosine, the arctangent, the arcsine and the arccosine. Anything else counted as not real, so the two-sided limit was NaN even where both sides agree.
This adds the tangent, the arccotangent,
erf,erfc,erfi,floor,ceil,roundandsgn, each real when its argument is real.(pi^2 + (1/2) / x) * erf(x)NaN1 / sqrt(pi)(1 + 1/x) * erf(x)NaN2 * 1 / sqrt(pi)(abs(x)^(x/pi))^sgn(x)NaN1floor(x)NaNNaNsgn(x)NaNNaNerfc(x) / xNaNNaNNaNx * sgn(x)000tan(x) / x111sgn(x) / x+oo+ooThe first three rows are in BREAKING-CHANGES.md. The new test pins them by value, and pins
floor(x),sgn(x)anderfc(x) / xas NaN, since their sides differ.Not in this PR:
x * floor(2/x)at 0 two-sided is NaN on master and on this branch, while each side is 2. The sides there are undecided, not different, and that is a separate change.Checked on this branch:
(abs(x)^(x/pi))^sgn(x)row above (seed 43). Seed 45'stanh(log(x, -1) - tan(x))from the left also moved into "did not finish in 5 s", but that limit takes 5.7 s on master as well as on this branch, so the 5 s cap decides it. That limit is unevaluated on both. Seed 237 of a wider sweep found the case.🤖 Generated with Claude Code