This repository was archived by the owner on Aug 29, 2024. It is now read-only.
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
solveEquation with negative power causes infinite loop #228
Open
Description
It turns out that the following equation x^-2 + x^-1 = x
causes a Math error: Potential infinite loop for equation:
error. However, when I change the equation to 1/x^2 + 1/x^1 = x
I don't get the error (FYI: 1/x^2 + 1/x^1 == x^-2 + x^-1
).
here are some more trials where I ran into the same problem
x^-2 + x^-1= x
x^-2 + x^-1 + x^0 = x^1 + x^2
x^-2 + x^-1 + x^0 = x^2 + x^1
x^-1 + x^-2 + x^0 = x^2 + x^1
x^0 + x^-1 + x^-2= x^1 + x^2
I ran solveEquation
with the debug flag, and it seems like the solver does not remember if it has already reached a step and loops forever.
Here is an illustration to tell you what I mean with that:
We are mathematically allowed to do the follow:
1 + 1 = x
1 = x - 1
1 + 1 = x
1 = x - 1
1 + 1 = x
1 = x - 1
...
I believe you get my point (infinite loop).
I suspect that solveEquation
is stuck in such a case.
Metadata
Metadata
Assignees
Labels
No labels