How to setup Math program

Posted by Miles on Stack Overflow See other posts from Stack Overflow or by Miles
Published on 2010-06-16T13:17:55Z Indexed on 2010/06/16 13:22 UTC
Read the original article Hit count: 183

Filed under:

I'm needing to write a program (C#) that will allow the user to create generic formulas with variables and numbers. For example:

D = A + (A - C / X)(7.8 - 6.6)
F = E + (E - C / X)(7.8 - 6.6)
FinalResult = (A + D)(0.9) + (E + F)(0.32) + B(0.1) + .023

where all variables would mean for me to go to a database and look something up based on values and return a number in its place. So A would be 2.12 for example (and the same for C and E)

Whats the best way to structure this program? How would I make my program read these formulas?

I've seen a little bit of the MathML but not sure how to get that started (or an example of it)

© Stack Overflow or respective owner

Related posts about c#