问题
I am looking for a C# dll to solve simple equation. Example ..
10 = 2 + 3 + x
Result should be x = 5;
Is there a free DLL?
回答1:
I've used this Math Expression Parsing library with positive results. The documentation he's provided was very useful to boot.
http://www.codeproject.com/KB/recipes/MathieuMathParser.aspx?display=Print
Your app can then accommodate ad hoc equations which the library will parse into component parts. You can then provide the values for required variables and it will evaluate the result.
The library includes many function (trig, log, factorials, datetime, random, etc.) and can handle user-defined functions.
回答2:
You can use Math Expression Editor Light (MEEL)
回答3:
Use System.Math if you have to make something more diffucult then an addition. Otherwise .. do it your self IT'S FREE !
来源:https://stackoverflow.com/questions/3268531/c-sharp-dll-to-solve-simple-equation