asc-community / asc-community/AngouriMath

ApproachFrom should be able to name a direction in the complex plane

Open
#720 6 comments 0 reactions 0 assignees View on GitHub
Proposal
Dominant language
C#
Stars
831
Forks
79
Avg merge
3h 23m
Merged PRs (30d)
309

Description

Split out of #596, where @Happypig375 noted: *"we should also add some way to represent a limit direction in the complex plane."*

`ApproachFrom` is `Left`, `Right`, `BothSides`. On the real line that is the whole story. In the complex plane it is not: approaching 0 along the negative reals is one ray out of infinitely many, so `lim x->0- ln(x) = -oo` is really a *directional* limit that happens to be spelled "from the left".

This matters beyond notation. Under a complex codomain, "from the left" and "from the right" are two arbitrary rays, and there is no reason the two of them agreeing should say anything about the limit as a whole -- which is part of why the promotion in the sibling issue has to be tied to the codomain rather than applied generally.

## Shape

`ApproachFrom` grows a way to name a direction, e.g. a limit along `e^(i*theta)`, with `Left` and `Right` staying as the `theta = pi` and `theta = 0` cases so nothing existing changes. `ComputeLimitImpl` already maps a finite destination to infinity by substituting `dest +- 1/x`; the directional case is `dest + e^(i*theta)/x`, so the substitution generalises cleanly.

It is an enum that has to grow rather than a rule that has to change, which is why this is filed separately -- it is a public API change and wants its own discussion.

Contributor guide

Open the contributing guide

Research direction

Start by locating the public ApproachFrom enum and reading ComputeLimitImpl, then review the context in sibling issue #596. Define how the directional case represents e^(i*theta)/x and verify that Left and Right retain their existing meanings while directional limits use the generalized substitution.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.