TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!
The tutorial consists of more than 200 live examples from 50 sections. Each of the examples can be copied and run on your own environment. In addition, mXparser provides an extensive collection of over 500 built-in math functions, expressions and symbols. Familiarize yourself with the scope and the syntax. Live testing is the best way to learn. Good luck! 🙂
Tutorial Math Collection API spec Download
Below is the code for JAVA, the code for C# is almost identical. To copy the code, double-click inside the frame.
Case 1: Expected value estimation using Probability Distribution Function
$$X\sim N(2,4) \quad \text{E}X = \int_{\mathbb{R}} xp(x) \text{d}x = 2$$
// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("int( x * pNor(x, 2, 4), x, -18, 22)");
mXparser.consolePrintln("Res. : " + e.getExpressionString() + " = " + e.calculate());
[mXparser-v.5.2.1] Res. : int( x * pNor(x, 2, 4), x, -18, 22) = 1.9999986197331323
Case 2: Probability estimation using Cumulative Distribution Function – the law of 3*SIGMA
$$X\sim N(0,1) \quad P(-3 < X < 3)$$
// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("cNor(3,0,1) - cNor(-3,0,1)");
mXparser.consolePrintln("Res. : " + e.getExpressionString() + " = " + e.calculate());
[mXparser-v.5.2.1] Res. : cNor(3,0,1) - cNor(-3,0,1) = 0.9973002039367398
Case 3: Calculating quantiles using Inverse Cumulative Distribution Function – males height example assuming males height distribution N(170, 15)
$$X\sim N(170,15)$$
// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("qNor(0.9, 170, 15)");
mXparser.consolePrintln("Res. : " + e.getExpressionString() + " = " + e.calculate());
[mXparser-v.5.2.1] Res. : qNor(0.9, 170, 15) = 189.223273483169
Nuget – Package Manager
Install-Package
MathParser.org-mXparser
-Version
5.2.1
dotnet add package
MathParser.org-mXparser
--version
5.2.1
<PackageReference Include=
"MathParser.org-mXparser"
Version=
"5.2.1"
/>
Maven – Dependency
<dependency>
<groupid>org.mariuszgromada.math
</groupid>
<artifactid>MathParser.org-mXparser
</artifactid>
<version>5.2.1
</version>
</dependency>
Maven – Gradle
implementation
'org.mariuszgromada.math:MathParser.org-mXparser:5.2.1'
Maven – Gradle (Kotlin)
implementation(
"org.mariuszgromada.math:MathParser.org-mXparser:5.2.1"
)
GitHub
git clone
https://github.com/mariuszgromada/MathParser.org-mXparser
OTHER DOWNLOAD OPTIONS
Download latest release – v.5.2.1 Orion: .NET bin onlyDownload latest release – v.5.2.1 Orion: JAVA bin onlyDownload latest release – v.5.2.1 Orion: bin + doc
NEWS FROM MATHPARSER.ORG
SOURCE CODE
Source code .zipSource code .tar.gz
View on GitHubMathSpace.pl