Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
idrisnacer opened this issue Nov 27, 2023 · 7 comments
Labels
Bug A serious math/runtime error good first issue Same as <easy> up-for-grabs <medium> up-for-grabs That task is between <easy> and <hard>. Maybe not five minutes of work, but also not too huge. up-for-grabs Issues which don't require internal knowledge to close so can be completed by outside contributors

Comments

@idrisnacer
Copy link

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
@WhiteBlackGoose
Copy link
Member

😭 why

@idrisnacer
Copy link
Author

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

@WhiteBlackGoose WhiteBlackGoose added Bug A serious math/runtime error up-for-grabs Issues which don't require internal knowledge to close so can be completed by outside contributors <medium> up-for-grabs That task is between <easy> and <hard>. Maybe not five minutes of work, but also not too huge. good first issue Same as <easy> up-for-grabs labels Nov 30, 2023
@blahutakrystian
Copy link

hi, @WhiteBlackGoose can i grab it?

@WhiteBlackGoose
Copy link
Member

@blahutakrystian sure

@SoulFireMage
Copy link

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)

@blahutakrystian
Copy link

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

@WhiteBlackGoose
Copy link
Member

@SoulFireMage you're right, there was a PR on this issue. Sorry 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A serious math/runtime error good first issue Same as <easy> up-for-grabs <medium> up-for-grabs That task is between <easy> and <hard>. Maybe not five minutes of work, but also not too huge. up-for-grabs Issues which don't require internal knowledge to close so can be completed by outside contributors
Projects
None yet
Development

No branches or pull requests

4 participants