MathParser.org-mXparser has been downloaded more than 3.500.000 times!
TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!
mXparser v.6.0 (Picon)
New awesome features:
1. mXparser in French
2. mXparser in German
3. mXparser in Italian
4. mXparser in Polish
5. mXparser in Portuguese
6. mXparser in Spanish
7. Implied Multiplication
8. Unicode Math Symbols
9. Flexible Registration of Calculation Steps
10. Serialization / Deserialization support
11. Cloning for thread safe operations (new in 5.2)
12. Help content in the JSON format (new in 5.2)
13. Help content in the Markdown format (new in 5.2)
14. Help content in the HTML format (new in 5.2)
15. Help content in the CSV format (new in 5.2)
16. Help content in the TXT format (improved in 5.2)
17. Accessing help programmatically (improved in 5.2)
18. Configuration of your own translation (new in 5.2)
19. Standardization of built-in elements descriptions (new in 5.2)
1. mXparser in French
2. mXparser in German
3. mXparser in Italian
4. mXparser in Polish
5. mXparser in Portuguese
6. mXparser in Spanish
7. Implied Multiplication
8. Unicode Math Symbols
9. Flexible Registration of Calculation Steps
10. Serialization / Deserialization support
11. Cloning for thread safe operations (new in 5.2)
12. Help content in the JSON format (new in 5.2)
13. Help content in the Markdown format (new in 5.2)
14. Help content in the HTML format (new in 5.2)
15. Help content in the CSV format (new in 5.2)
16. Help content in the TXT format (improved in 5.2)
17. Accessing help programmatically (improved in 5.2)
18. Configuration of your own translation (new in 5.2)
19. Standardization of built-in elements descriptions (new in 5.2)
Tutorial Math Collection API spec Download
Package installation
Nuget – Package Manager
Install-Package
MathParser.org-mXparser
-Version
6.0.0
dotnet add package
MathParser.org-mXparser
--version
6.0.0
<PackageReference Include=
"MathParser.org-mXparser"
Version=
"6.0.0"
/>
Maven – Dependency
<dependency>
<groupid>org.mariuszgromada.math
</groupid>
<artifactid>MathParser.org-mXparser
</artifactid>
<version>6.0.0
</version>
</dependency>
Maven – Gradle
implementation
'org.mariuszgromada.math:MathParser.org-mXparser:6.0.0'
CMake – Dependency / FetchContent
include(FetchContent)
FetchContent_Declare(MathParserOrgMxParser
GIT_REPOSITORY https://github.com/mariuszgromada/MathParser.org-mXparser.git
SOURCE_SUBDIR CURRENT/cpp/lib
)
FetchContent_MakeAvailable(MathParserOrgMxParser
)
target_link_libraries(YourExecutable MathParserOrgMxParser
)
GitHub
git clone
https://github.com/mariuszgromada/MathParser.org-mXparser
mXparser is a super easy, rich, fast, and highly flexible math engine library that includes expression parser and expression evaluator (parser and evaluator of mathematical expressions / formulas provided as plain text / string). The software provides easy-to-use APIs for JAVA, Kotlin, Android, C++, C# .NET / .NET Core / MONO (including compatibility with CLS / Common Language Specification: F#, Visual Basic, C++/CLI). The expression parser comes with extensive documentation, an easy-to-follow tutorial, a step-by-step “Hello World” projects and a summary of performance tests. The formula parser / evaluator is distributed under the DUAL LICENSE model, that is designed to meet the needs of both Non-Commercial Use as well as Commercial Use.
mXparser works at runtime, which means it can fully execute end user commands while the entire application is running
JAVA Demo – showing how easy it is to define a user function along with its use in an expression
C# Demo – showing how easy it is to define a user function along with its use in an expression
Few examples of string equivalent to the math formula notation:
MATH EXPRESSION | MXPARSER EXPRESSION STRING |
$1+2$ | “1+2” |
$1+\frac{2}{3} + (4\cdot 5-10)$ | 1+2/3 +(4*5-10) – classic or 1+2_3+(4*5-10) – with fractions or 1+2_3+(4×5-10) – with fractions and Unicode math or 1+2÷3+(4⨉5-10) – with fractions and Unicode math or 1+2÷3+(4∙5-10) – with fractions and Unicode math |
$2x+\sin(y)$ | 2*x+sin(y) – classic or 2x+sin(y) – with implied multiplication |
$\int_{-1}^{1}\sqrt{1-x^2}$ | int( sqrt(1-x^2), x, -1, 1) – classic or ∫( sqrt(1-x^2), x, -1, 1) – with Unicode math or ∫( √(1-x^2), x, -1, 1) – with even more Unicode math |
$\sum_{n=1}^{100}\frac{1}{n^2}$ | sum(n, 1, 100, 1/n^2) – classic or ∑(n, 1, 100, 1/n^2) – with Unicode math Σ(n, 1, 100, 1÷n^2) – with Unicode math (another symbols) |
$n\choose k$ | C(n,k) |
$fib_n=\begin{cases}fib_{n-1}+fib_{n-2}\\fib_1=1\\fib_0=0\end{cases}$ | fib(n) = iff( n>1, fib(n-1)+fib(n-2); n=1, 1; n=0, 0) |
$2\frac{3}{4} + 3\frac{2}{3}+\frac{1}{2} $ | 2_3_4+3_2_3+1_2 – with fractions or 2+3/4+3+2/3+1/2 – classic |
$f(x,y)=x^2+\sin x+\cos y$ | f(x,y) = x^2+sin(x)+cos(y) |
$\sqrt{\pi}$ | sqrt(pi) – classic or √ℼ – with Unicode math |
Math parser – main features summary
FEATURE | COMMENT / EXAMPLES |
Broad list of supported frameworks | JAVA, .NET – many versions |
Rich Match Collection | 500+ built-in keywords including: operators, constants, math functions |
Implied Multiplication | 2x+3sin(x) 2(3+4)2(4+3) |
Unicode Symbols | α, β, … ∑, ∛, … ⊽, ⊼, ⇔, .. ×, ÷, … |
User Defined Arguments | x = 2 y = 2x |
User Defined Functions | f(x) = 2x f(x,y) = sin(x)+cos(y) |
User Defined Variadic Functions | f(…) = sum(i, 1, [npar], par(i) ) |
User Defined Constants | a = 2 |
User Defined Random Variables | Random value on each call |
User Defined Recursion | Fully supported |
Evaluating conditions | if(a=true, then b, else c) |
Cases functions | iff(case1, then a1, case2, then a2, …) |
Iterated operators | sum( 1, n, f(…,i) {step} ) prod( 1, n, f(…,i) {step} ) |
Derivatives | der( sin(x), x) ) |
Integrals | 2*int( sqrt(1-x^2), x, -1, 1) |
Syntax checking | Check syntax Check Lex syntax |
Calculation Steps Register | Flexible registration of all the calculation steps. |
Rich Match Collection: list of 500+ built-in keywords
BUILT-IN KEYWORD CATEGORY | # OF BUILT-IN KEYWORDS |
Operator | 16 |
Boolean Operator | 40 |
Bitwise Operator | 6 |
Binary Relation | 14 |
Math Constant Physical Constant Astronomical Constant | 93 |
Unit | 105 |
Iterated Operator | 12 |
Calculus Operator | 15 |
Unary Function | 105 |
Binary Function | 36 |
3-args Function | 15 |
Variadic Function | 23 |
Random Variable | 32 |
Parser Symbol | 5 |
Number Literals | 6 |
TOTAL | 500+ |
Supported frameworks
JAVA | 1.6+: separate binaries for each version |
Android | fully tested with JAVA binaries |
.NET | 5.0+: separate binaries for each version |
.NET Framework / MONO | 3.5+: separate binaries for each version |
.NET Core | 1.0+: separate binaries for each version |
.NET Standard | 1.0+: separate binaries for each version |
.NET PCL | portable45, win8, wpa81 |
Xamarin.Andoird | 1.0, 6.0 |
Xamarin.iOS | 1.0 |
Nuget – Package Manager
Install-Package
MathParser.org-mXparser
-Version
6.0.0
dotnet add package
MathParser.org-mXparser
--version
6.0.0
<PackageReference Include=
"MathParser.org-mXparser"
Version=
"6.0.0"
/>
Maven – Dependency
<dependency>
<groupid>org.mariuszgromada.math
</groupid>
<artifactid>MathParser.org-mXparser
</artifactid>
<version>6.0.0
</version>
</dependency>
Maven – Gradle
implementation
'org.mariuszgromada.math:MathParser.org-mXparser:6.0.0'
CMake – Dependency / FetchContent
include(FetchContent)
FetchContent_Declare(MathParserOrgMxParser
GIT_REPOSITORY https://github.com/mariuszgromada/MathParser.org-mXparser.git
SOURCE_SUBDIR CURRENT/cpp/lib
)
FetchContent_MakeAvailable(MathParserOrgMxParser
)
target_link_libraries(YourExecutable MathParserOrgMxParser
)
GitHub
git clone
https://github.com/mariuszgromada/MathParser.org-mXparser
OTHER DOWNLOAD OPTIONS
Download latest release – v.6.0.0 Picon: .NET bin onlyDownload latest release – v.6.0.0 Picon: JAVA bin onlyDownload latest release – v.6.0.0 Picon: bin + doc
NEWS FROM MATHPARSER.ORG
SOURCE CODE
Source code .zipSource code .tar.gz
View on GitHubMathSpace.pl