Skip to content

Ask the whole limit of a quotient of two infinities in the descent - #2369

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
fix/a-function-of-a-logarithm-reads-its-limit
Nov 4, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
fix/a-function-of-a-logarithm-reads-its-limit

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

exp(log(1/x, arcsin(x))) at 0 from the right was left unevaluated. The logarithm alone tends to -1, so the limit is 1/e.

The logarithm reaches the descent as ln(arcsin(x)) / ln(1/x). That went wrong in two places:

  • Its derivatives' quotient came back with the limit 0 * +oo / 0, a form with no value. The quotient's descent returned that form at once as the exponent's limit.
  • The parts tend to -oo and +oo. The descent asked for the quotient's whole limit only when substituting finite parts came back NaN, and two infinite parts never go through that substitution.

A sine of the logarithm was left unevaluated too, and so was a hyperbolic sine, after ten seconds. 2.6.0 gives the same results.

Now a form with no value from the first reading is kept for the end, where it was returned before, and the parts are read first. The whole limit is also asked where the parts' limits make oo/oo and the substitution has no value. Only a value is taken from it.

Input 2.6.0 and master Now
e^log(1/x, arcsin(x)) at 0⁺ unevaluated 1 / e
sin(log(1/x, arcsin(x))) at 0⁺ unevaluated sin(-1)
sinh(log(1/x, arcsin(x))) at 0⁺ unevaluated, in 10 s (1 / e - e) / 2, in 2.6 s
tanh(log(x, arcsin(x))) at 0⁻ unevaluated, in 6 s tanh(1), in 0.9 s

The product was left alone. Changing the 0·oo reading in the product broke the two-sided convention. I tried two changes: making that case decline, and asking for the product's whole limit. Both turned x * ln(x) at 0 into 0 where it is pinned at NaN. From both sides the descent reads ln(x) at 0 as -oo, and the NaN that 0 * -oo comes back as is what holds the convention. The convention is open on #2365. A test here pins that it still holds.

Measured

  • limitcheck at DEPTH=3 on 15 seeds (14, 16, 19, 23, 26, 28, 29, 31, 33, 34, 36, 38, 40, 41, 42), master against this branch: 22 more rows compared, across 11 seeds. No row moved from a value to another value or to NaN.
  • One row crossed the harness's 5 s cap: (log(pi, x))^sinh(x) * sin(1) at 0⁻. Measured alone it declines in 7.05 s on this branch and 7.09 s on master, so the time is the same.
  • The new tests fail on master: the three right-hand rows that have a composition. The sinh row took 8 minutes to fail under the test runner.
  • Suite: 18968 passed, 0 failed. AOT passed. BoundCheck, RootCheck, CasBench, PropCheck, SimpSweep, RuleCheck, CanonCheck and Confluence are clean.

Found by limitcheck at seed 40. Recorded in BREAKING-CHANGES.md.

🤖 Generated with Claude Code

exp(log(1/x, arcsin(x))) at 0 from the right was left unevaluated, where
the logarithm alone is -1 and the limit is 1/e. The logarithm reaches the
descent as ln(arcsin(x)) / ln(1/x). The limit its derivatives' quotient
was taken to came back as the form 0 * +oo / 0, which has no value, and
the quotient's descent returned that at once as the exponent's limit.
And with parts tending to -oo and +oo, the descent asked the quotient's
whole limit only when a substitution of finite parts came back NaN,
which two infinite parts never are. A sine of the logarithm was left
unevaluated too, and a hyperbolic sine after ten seconds. The same on
2.6.0.

A form with no value from the first reading is now kept for the end,
where it was answered before, and the parts are read first; and the
whole limit is asked where the parts' own limits make oo/oo and the
substitution has no value. Only a value is taken from it.

The 0 * oo in the product below was not touched: from both sides ln(x)
at 0 reads as -oo, and the NaN that 0 * -oo comes back as is what keeps
x * ln(x) NaN there under the two-sided convention. Declining it, or
asking the product's whole limit, answered 0.

limitcheck at DEPTH=3, 15 seeds 14-42, master against this: 22 more
compared over 11 seeds, among them tanh(log(x, arcsin(x))) at 0 from the
left, which master declines after six seconds and this answers with
tanh(1) in one. One row crossed the harness's 5 s cap,
(log(pi, x))^sinh(x) * sin(1) at 0 from the left, which declines in 7.05 s
here and 7.09 s on master. Suite 18968 passed, AOT and the eight
harnesses clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 4, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Nov 4, 2026
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.78%. Comparing base (88e0661) to head (099de6f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2369      +/-   ##
==========================================
- Coverage   86.78%   86.78%   -0.01%     
==========================================
  Files         312      312              
  Lines       68867    68873       +6     
  Branches    20069    20070       +1     
==========================================
+ Hits        59766    59769       +3     
- Misses       4910     4911       +1     
- Partials     4191     4193       +2     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.32% <100.00%> (-0.01%) ⬇️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

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

Files with missing lines Coverage Δ
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 75.00% <100.00%> (+1.61%) ⬆️

... and 10 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 4c203f0 into master Nov 4, 2026
28 of 35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Nov 4, 2026
@Rafael-SOWNet

Copy link
Copy Markdown
Member Author

Merged without the macOS jobs. Each one was cancelled before it started, with "The job was not acquired by Runner of type hosted even after multiple attempts" (macOS arm64 capacity), the same outage as on #2368. In their place:

@Rafael-SOWNet
Rafael-SOWNet deleted the fix/a-function-of-a-logarithm-reads-its-limit branch November 4, 2026 16:54
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