Skip to content

Read the side a quotient arrives at a constant from by its parts in a limit - #2415

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/a-step-of-a-logarithm-quotient-in-a-limit
Nov 12, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/a-step-of-a-logarithm-quotient-in-a-limit

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

SignNear now reads the side a quotient arrives at a constant from by the quotient's parts. a / b - c is (a - c b) / b, so its sign is the sign of a - c b times the sign of b. Those are two smaller questions than the slope that l'Hôpital's rule was asked for before. A step function of a quotient tending to a constant, such as floor or ceil, needs exactly this sign.

log(x / 2, tan(x)) at 0 from the right is ln(tan(x)) / ln(x / 2), which tends to 1. ln(tan(x)) - ln(x / 2) tends to ln(2), and ln(x / 2) tends to -oo. So the quotient arrives from below, and its floor is 0.

Input, at 0 2.6.0 master this branch
floor(log(x / 2, tan(x))), Right unevaluated, 0.19 s unevaluated, 17 s 0, 0.29 s
floor(log(pi / x, tan(x))), Right unevaluated, 0.18 s unevaluated, 9.9 s -1, 0.30 s
floor(tanh(1 / x)), Right unevaluated, 0.16 s unevaluated, 0.35 s 0, 0.17 s
floor(tanh(1 / x)), BothSides unevaluated, 0.12 s unevaluated, 0.49 s NaN, 0.32 s

floor(tanh(1 / x)) from the left was already -1 on master. The sides differ, so the two-sided limit is NaN, as sgn(x) and floor(x) at 0 already are. All four rows are in BREAKING-CHANGES.md and in the new test.

The new check runs after the power's own reading from #2414 and before the slope. It applies only to the shape a / b - c, with c free of the variable.

Checked on this branch:

  • Tests: UnitTests 19303 passed, plus the MCP, Terminal, InteractiveWrapper and F# wrapper suites, and the AOT smoke test. The tanh cases were added to the test after this run; the code is unchanged.
  • Harnesses: BoundCheck, RootCheck, CasBench, PropCheck, SimpSweep, RuleCheck, CanonCheck and Confluence all pass.
  • limitcheck at DEPTH=3, COUNT=600, on 42 seeds against master: the only difference is the new row floor(tanh(1 / x)) at 0 from the right, answered 0. limitcheck samples it at 1, because tanh(10^4) rounds to exactly 1.0 in double; the true value stays below 1, so 0 is right.

🤖 Generated with Claude Code

… limit

a / b - c is (a - c b) / b, and its sign near the point is the sign of a - c b
times that of b, two smaller questions than its slope. A step function of a
quotient tending to a constant asks exactly that: floor(log(x / 2, tan(x)))
at 0 from the right was left unevaluated after 20 s in l'Hopital's rule on the
slope, and is now 0 in 0.35 s, as ln(tan(x)) - ln(x / 2) tends to ln(2) and
ln(x / 2) to -oo. floor(log(pi / x, tan(x))) there is -1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.79%. Comparing base (a5f5bc8) to head (7555980).

Files with missing lines Patch % Lines
...ath/Functions/Continuous/Limits/Transformations.cs 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2415      +/-   ##
==========================================
- Coverage   86.81%   86.79%   -0.02%     
==========================================
  Files         312      312              
  Lines       69481    69489       +8     
  Branches    20295    20298       +3     
==========================================
- Hits        60318    60315       -3     
- Misses       4929     4939      +10     
- Partials     4234     4235       +1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.34% <88.88%> (-0.02%) ⬇️
fsharp 32.97% <ø> (ø)
interactive 39.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ath/Functions/Continuous/Limits/Transformations.cs 88.73% <88.88%> (-0.02%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit 71ef76e into master Nov 12, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 12, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/a-step-of-a-logarithm-quotient-in-a-limit branch November 12, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant