Skip to content

An infinity over a vanishing divisor is the infinity of the signs - #2295

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-two-sided-limit-asks-each-side-where-the-expression-is-real-on-both
Oct 31, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-two-sided-limit-asks-each-side-where-the-expression-is-real-on-both

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

limit(ln(x^2) / (cos(x) - 1), x, 0) was NaN, the claim that there is no limit, where it is +oo from both sides. Each side's descent replaced the parts with their limits and read (-oo) / 0. That says nothing about the side the divisor vanishes from, so it is NaN. DivergesAtAVanishingDivisor, which does read that side, required a finite dividend. An infinity with a sign, over a divisor vanishing from one side, is no more indeterminate than a number is: the result is the infinity whose sign is the product of the two. The rule now takes an infinite dividend too.

Input 2.6.0 master Now
limit(ln(x^2) / (cos(x) - 1), x, 0) NaN NaN +oo
limit(ln(x^2) / ln(1 - x^2/2), x, 0) NaN NaN +oo
limit(ln(abs(x)) / ln(cos(x)), x, 0) NaN NaN +oo
limit(ln(x^2) / ln(cos(x)), x, 0) -oo NaN (#2275) +oo

AnInfinityOverAVanishingDivisorTest covers three groups. The four limits above fail on master. Four limits that were already answered are unchanged, and three with no limit stay NaN, x^x at 0 (#719) among them. The suite (18,447), the trio, F#, AOT and the eight harnesses pass locally. #2275's BREAKING row for ln(x^2) / ln(cos(x)) now says +oo.

The issue placed the cause in WhereBothSidesAgree's real-codomain gate, and that was wrong. I opened the gate for expressions that are real on each side, and nothing changed: each side was still (-oo) / 0, which evaluates to NaN. This rule is the cause, and the gate is unchanged.

Fixes #2274.

🤖 Generated with Claude Code

limit(ln(x^2) / (cos(x) - 1), x, 0) was NaN, the claim that there is
no limit, where it is +oo from both sides. Each side's descent put the
parts' limits in place of the parts and read (-oo) / 0, which says
nothing about the side the divisor vanishes from and is NaN, and
DivergesAtAVanishingDivisor, which reads that side, asked for a finite
dividend. An infinity with a sign over a divisor vanishing from one
side is no more indeterminate than a number is: it is the infinity of
the two signs' product. The rule now takes one.

AnInfinityOverAVanishingDivisorTest takes four two-sided limits that
were NaN, four one-sided and two-sided ones that were answered and are
unchanged, and three that have no limit and stay NaN, x^x at 0 among
them; the four fail on master. The suite, the trio, F#, AOT and the
eight harnesses pass. #2275's entry for ln(x^2) / ln(cos(x)) now reads
+oo.

The issue put the cause at WhereBothSidesAgree's real-codomain gate.
Opening the gate changed nothing: each side was still (-oo) / 0.

Fixes #2274.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.73%. Comparing base (2c9dceb) to head (6243980).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2295   +/-   ##
=======================================
  Coverage   86.73%   86.73%           
=======================================
  Files         310      310           
  Lines       67960    67960           
  Branches    19740    19740           
=======================================
+ Hits        58946    58947    +1     
  Misses       4881     4881           
+ Partials     4133     4132    -1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.28% <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 Δ
...ath/Functions/Continuous/Limits/Transformations.cs 87.21% <100.00%> (ø)

... and 6 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 17cd9da into master Oct 31, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 31, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-two-sided-limit-asks-each-side-where-the-expression-is-real-on-both branch October 31, 2026 06:13
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.

A two-sided limit is NaN where both one-sided limits are the same infinity

1 participant