Skip to content

Pin the limits #231 asked for, including the one still unticked (#231) - #1136

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
the-limits-the-issue-listed
Sep 1, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
the-limits-the-issue-listed

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Closes #231.

All three cases answer, including the one still unticked

the issue's list
lim (1 + 1/x)^x as x → +oo e
lim sin(x)/x as x → 0 1
lim e^x - x as x → +oo +oo — its box is still unchecked on the issue

Measured rather than read off: this workspace has had recorded verdicts turn out stale seven times, so an old checklist is a hypothesis.

Why tests rather than just closing it

An issue's list is not a test. Closing #231 on three passing examples leaves nothing that fails if one of them stops working — and a limit solver is a search over several methods, where which one answers depends on the shape of the input. Three cases say almost nothing about the capability.

So the file covers twenty, chosen to exercise different paths rather than to be numerous:

  • the two remarkable limits with their constants moved — (1 + 2/x)^x → e^2, (1 + 1/x)^(2x) → e^2 — so a rule is applied rather than a value recognised
  • indeterminate powers: (1 + 1/x)^(x^2) → +oo
  • differences of infinities: x - ln(x), e^x - x^2
  • polynomial against exponential, both ways: x^2/e^x → 0, e^x/x^100 → +oo
  • a root cancelling a linear term: sqrt(x^2 + x) - x → 1/2
  • an oscillation damped by its argument: sin(1/x)·x → 1
  • the higher-order expansions: (sin(x) - x)/x^3 → -1/6, (1 - cos(x))/x^2 → 1/2
  • (2^x - 1)/x → ln(2), arctan(x) → pi/2

One thing worth stating

x * ln(x) and x^x at zero answer NaN two-sided, and answer correctly — 0 and 1 — one side at a time. That is a decision, not a gap: ln(x) is not real to the left of zero, so there is no two-sided limit to report, and OneSidedLimitTest already records the reasoning.

It is pinned in both directions here, so that "does not answer" and "answers correctly" cannot later be mistaken for one another by someone reading only the two-sided result.

Failed: 0, Passed: 23 on net10.0, against clean master — these pin existing behaviour and depend on nothing else in flight.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

All three cases the issue lists answer on master, `lim e^x - x` among them, whose box is still
unchecked. Measured rather than read: the issue is old, and this workspace has had recorded
verdicts turn out stale seven times.

Pinned as tests because an issue's list is not one. Closing #231 on the strength of three passing
examples would leave nothing that fails if a limit stops working, and a limit solver is a search
over several methods where which one answers depends on the shape -- so three cases say almost
nothing about the capability.

Hence the wider sweep: the two remarkable limits with their constants moved, so that a rule is
exercised rather than a value recognised; an indeterminate power; a difference of infinities;
polynomial against exponential; a root cancelling a linear term; an oscillation damped by its
argument. Twenty in all.

`x * ln(x)` and `x^x` at zero answer NaN two-sided and answer correctly one side at a time. That is
a decision rather than a gap -- `ln(x)` is not real to the left of zero, so there is no two-sided
limit to report -- and it is pinned in both directions, so that "does not answer" and "answers
correctly" cannot later be mistaken for one another.

Part of #231.
…e-listed

# Conflicts:
#	Sources/.editorconfig
@Rafael-SOWNet
Rafael-SOWNet merged commit 1ad583c into master Sep 1, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

we need more limit solvers

1 participant