-
Notifications
You must be signed in to change notification settings - Fork 156
Home
Mariusz Gromada edited this page Dec 30, 2015
·
13 revisions
mXparser - a super easy, rich and highly flexible mathematical expressions parser (Math Parser) library for JAVA and C# .NET.
Expression e = new Expression("2+3");
e.calculate();
👍
Expression e = new Expression("2+(3-5)^2");
e.calculate();
👍
Expression e = new Expression("2*pi");
e.calculate();
👍
Constant tau = new Constant("tau = 2*pi");
Expression e = new Expression("3*tau", tau);
e.calculate();
👍
Expression e = new Expression("sin(2*pi)");
e.calculate();
👍
Expression e = new Expression("gcd(2,5,10,30)");
e.calculate();
👍
Argument x = new Argument("x = 5");
Expression e = new Expression("sin(x)");
e.calculate();
👍
Argument x = new Argument("x = 5");
Argument y = new Argument("y = 2*x", x);
Expression e = new Expression("sin(y)", y);
e.calculate();
👍
Argument x = new Argument("x = 5");
Expression e = new Expression("if(sin(x) > 5, 1, 0)", x);
e.calculate();
👍
Expression e = new Expression("5=6");
e.calculate();
👍
Expression e = new Expression("5 <= 6");
e.calculate();
👍
Expression e = new Expression("sum(i, 1, 10, 2*i^2 + pi)");
e.calculate();
👍
Expression e = new Expression("prod(i, 1, 5, i, 0.5)");
e.calculate();
👍
[iterated operators] You want to have fun with math? I have a special gift for you - lets approximate sin(x) by using sigma summation and Taylor series definition!
Argument x = new Argument("x = pi/2");
Expression e20 = new Expression("sum(n,0,10,(-1)^n*(x^(2*n+1))/(2*n+1)!)", x);
e.calculate();
👍
[calculus] You still want more fun with calculus operations? Great! There is a support for numerical differentiation!
Argument x = new Argument("x = pi/2");
Expression e = new Expression("cos(x)-der(sin(x), x)", x);
e.calculate();
👍
Expression e = new Expression("2*int(sqrt(1-x^2), x, -1, 1)");
e.calculate();
👍
mXparser - Math Parser Java C# .NET (CLS) Library - a super easy, rich and flexible mathematical expressions parser for JAVA Android Kotlin C# .NET and C++ - Provided by Mariusz Gromada, for more information please visit: MathParser.org, MathSpace.pl, mXparser on GitHub pages, mXparser on SourceForge.