Solve equation from string to result in C
- by Alexandre Cassagne
Hi,
I would like to know if anyone has info or experience on how to do something which sounds simple but doesn't look like it when trying to program it.
The idea is : give a string containing an equation, such as : "2*x = 10" for example (this is simple, but it could get very complex, such as sqrt(54)*35=x^2; and so on....) and the program would return x = 5 and possibly give a log of how he got there.
Is this doable ? If so, does anyone have a lead ? For info there is this site (http://www.numberempire.com/equationsolver.php) which does the same thing in PHP, but isn't open source.
Thanks for any help !