AngouriMath
ComputeLimitDivideEtImpera(AngouriMath.Entity.Variable,AngouriMath.Entity,AngouriMath.Core.ApproachFrom)
Method (no overloads)
Summary
https://en.wikipedia.org/wiki/Divide_and_rule Divide and rule (Latin: divide et impera), or divide and conquer,
in politics and sociology is gaining and maintaining power by
breaking up larger concentrations of power into pieces that
individually have less power than the one implementing the strategy.
In computer science, divide and conquer is an algorithm design paradigm
based on multi-branched recursion. A divide-and-conquer algorithm works
by recursively breaking down a problem into two or more sub-problems of
the same or related type, until these become simple enough to be solved
directly. The solutions to the sub-problems are then combined to give a
solution to the original problem.
Here we try to compute the limit for each child and then merge them into the limit
of the whole expression. Theoretically, for cases such as limit (x -> -1) 1 / (x + 1)
this method will return NaN, but thanks to replacement of x by a non-definite
expression, it is somehow compensated.
in politics and sociology is gaining and maintaining power by
breaking up larger concentrations of power into pieces that
individually have less power than the one implementing the strategy.
In computer science, divide and conquer is an algorithm design paradigm
based on multi-branched recursion. A divide-and-conquer algorithm works
by recursively breaking down a problem into two or more sub-problems of
the same or related type, until these become simple enough to be solved
directly. The solutions to the sub-problems are then combined to give a
solution to the original problem.
Here we try to compute the limit for each child and then merge them into the limit
of the whole expression. Theoretically, for cases such as limit (x -> -1) 1 / (x + 1)
this method will return NaN, but thanks to replacement of x by a non-definite
expression, it is somehow compensated.
Remarks
Null, not Limitf. This used to hand back
new Limitf(this, ...) , which reads as the honest "I could not settle this"
and is in fact a cycle: the caller evaluates the node to compare it, evaluating a
Limitf computes the limit, and computing arrives back here. That
overflows the stack, which kills the process rather than raising anything a caller
can catch — the exact failure AGENTS.md names, with this exact expression as its
example.
It made every node without an override a landmine, since inheriting the default
was enough to crash: floor, ceil, round, min, max, gcd and phi all did.
Returning null reads the same to every caller here — they all test with
is { } — and terminates.
https://github.com/asc-community/AngouriMath/issues/829
https://github.com/asc-community/AngouriMath/issues/833
and is in fact a cycle: the caller evaluates the node to compare it, evaluating a
Limitf computes the limit, and computing arrives back here. That
overflows the stack, which kills the process rather than raising anything a caller
can catch — the exact failure AGENTS.md names, with this exact expression as its
example.
It made every node without an override a landmine, since inheriting the default
was enough to crash: floor, ceil, round, min, max, gcd and phi all did.
Returning null reads the same to every caller here — they all test with
https://github.com/asc-community/AngouriMath/issues/829
https://github.com/asc-community/AngouriMath/issues/833
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1953 pages online