All,
I’m in the process of building a web application (C#, MVC3 Razor) which will need to support entry of mathematical formulas. I know there are a number of good JavaScript libraries to do this. My current question has to do with the other end.
After users have entered formulas they need to interact with them in a dynamic calculator. The math is never significantly complex. Just the four big operations (+, -, *, /). And the formulas aren’t going to be overly long.
I can’t help but feeling someone must have solved this problem before. Anyone know of anything?
Some additional requirements:
– Ability to plug constants known to the system into a formula.
– Ability to indicate a value is based upon two others which are used to read from a reference table. (In other words user enters a 5 and a 20, system goes to a table and knows that in such a case the value 3.2 should be used in the formula.)
I fully expect I’ll have some customizing to do. So close and flexible is good enough.
To boil the problem down:
– Input: A formula in some known format/markup
– Process: Conversion into mathematical symbols and markers for inputs
– Render: User interactive calculator allowing users to input values and get output defined by the formula.
Thanks in advance.
I would try NCalc