asc-community/AngouriMath

Solving a system of equations where one of the variables is equal to zero returns Null

Closed this issue ยท 7 comments

The version I use: AngouriMath, Version="10.0.0-master-1697660059-79490e3"

Unexpected behaviour or bug: system should be solved

In the example below, Solve("x", "y") returns Null :

var system = MathS.Equations(
      "x - y - 1000",
      "y - 0");
 var results = system.Solve("x", "y");
 Assert.NotNull(results); // fails

or

var system = MathS.Equations(
      "x - y - 1000",
      "y");
 var results = system.Solve("x", "y");
 Assert.NotNull(results); // fails

I've done some more testing where it returns the results :

var system = MathS.Equations(
      "x - y - 1000",
      "y - 1 + 1");
 var results = system.Solve("x", "y");
 Assert.NotNull(results); // passes
var system = MathS.Equations(
      "x - y - 1000",
      "y - 50");
 var results = system.Solve("x", "y");
 Assert.NotNull(results); // passes

๐Ÿ˜ญ why

Also, i don't know if its related, this fails :

var system = MathS.Equations(
         "x - y - 1000",
         "y");
var results = system.Solve("x", "y");
Assert.NotNull(results); // fails

But when i change the order of variables it works ! :

var system = MathS.Equations(
         "x - y - 1000",
         "y");
var results = system.Solve("y", "x");
Assert.NotNull(results); // passes

hi, @WhiteBlackGoose can i grab it?

Would I be right in thinking that this one is resolved?

I had a quick go as a first timer and found the first example given in these comments now pass (assuming I did it right)

go ahead, it looks complicated for me, takes time to understand the project

@SoulFireMage you're right, there was a PR on this issue. Sorry ๐Ÿ˜„