How would someone implement mathematical formulae in java?

Posted by Mohit Deshpande on Stack Overflow See other posts from Stack Overflow or by Mohit Deshpande
Published on 2010-06-16T06:33:33Z Indexed on 2010/06/16 6:52 UTC
Read the original article Hit count: 204

Filed under:
|
|

What I mean is like have to user input a string with multiple variables and get the value of those variable. Like a simple quadratic formula: x^2 + 5x + 10. Or in java: (Math.pow(x,2)) + (x * 5) + 10The user would then enter that and then the program would solve for x. I will be using the BeanShell Interpreter class to interpret the string as an equation. But how would I solve for x?

© Stack Overflow or respective owner

Related posts about java

Related posts about math