JeffBramlett / EquationSolvr

Solve Equations Expressed as strings
MIT License
2 stars 0 forks source link

Solve equations #1

Open troelschristensen opened 4 years ago

troelschristensen commented 4 years ago

Hi.

I have a question about the package. I am using VB in VS2020. Can this package be used to solve different equations eq. 2x+3=5x+8 or 2(3x+4) = 2x + 12 ? Or any other simple equations like this?

Kind regards. Troels Christensen

Sent with GitHawk

JeffBramlett commented 3 years ago

The library is not designed to solve algebraic expressions to solve for variables like this. The use case being to solve persisting formulas with branches and varying values to effect changes to a stateful object.

It will however solve for x when reducing the expression where x in on one side of the '=' .

Examples: 2x+3=5x+8 reduces to x = 5/-3 2(3x+4) = 2x + 12 reduces to x = 1

JeffBramlett commented 3 years ago

I will however work on allowing this type of solution

troelschristensen commented 3 years ago

Hi @JeffBramlett That would be so great.👌Thank you.💪👌

Sent with GitHawk

Sizer123 commented 10 months ago

Hello. Please i am using the library. I am not able to get any result when executing my code :

FinalFormula = "(X * 2) = 300";

EquationProject project = new EquationProject() { Title = "Final Formula", Equations = new List() { new Equation() { UseExpression = "false", Expression = FinalFormula, Target = "x", } } };

Please Help