The Visitor Design Pattern, Differentiation, and Assembly Code Generation for Infix Expression.
Use javac
in command line to compile Main.java or use IDE (likes eclipse or IntelliJ IDEA).
* If input has same number(or variables) more than 2 number my program can't simplify.
Ex. x+x+x It can't simplify to 3*x.
* If input is evaluated value less than 0 my program can't simplify to negative value.
Ex. 0 - x It can't simplify to -x.
* If input x+x after differentiate it can't simplify to 2.
If input has divided by zero, it will throw an exception.