MathParser.org-mXparser has been downloaded more than 4.000.000 times!
TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!
mXparser v.6.1 (Sagitara)
New awesome features:
1. mXparser supports C++ (new in 6.1)
2. mXparser in Chinese (new in 6.1)
3. mXparser in French (new in 6.0)
4. mXparser in German (new in 6.0)
5. mXparser in Italian (new in 6.0)
6. mXparser in Polish (new in 6.0)
7. mXparser in Portuguese (new in 6.0)
8. mXparser in Spanish (new in 6.0)
9. Implied Multiplication (new in 5.0)
10. Unicode Math Symbols (new in 5.0)
11. Flexible Registration of Calculation Steps (new in 5.1)
12. Serialization / Deserialization support (new in 5.1)
13. Cloning for thread safe operations (new in 5.2)
14. Help content in the JSON format (new in 5.2)
15. Help content in the Markdown format (new in 5.2)
16. Help content in the HTML format (new in 5.2)
17. Help content in the CSV format (new in 5.2)
18. Help content in the TXT format (improved in 5.2)
19. Accessing help programmatically (improved in 5.2)
20. Configuration of your own translation (new in 5.2)
21. Standardization of built-in elements descriptions (new in 5.2)
1. mXparser supports C++ (new in 6.1)
2. mXparser in Chinese (new in 6.1)
3. mXparser in French (new in 6.0)
4. mXparser in German (new in 6.0)
5. mXparser in Italian (new in 6.0)
6. mXparser in Polish (new in 6.0)
7. mXparser in Portuguese (new in 6.0)
8. mXparser in Spanish (new in 6.0)
9. Implied Multiplication (new in 5.0)
10. Unicode Math Symbols (new in 5.0)
11. Flexible Registration of Calculation Steps (new in 5.1)
12. Serialization / Deserialization support (new in 5.1)
13. Cloning for thread safe operations (new in 5.2)
14. Help content in the JSON format (new in 5.2)
15. Help content in the Markdown format (new in 5.2)
16. Help content in the HTML format (new in 5.2)
17. Help content in the CSV format (new in 5.2)
18. Help content in the TXT format (improved in 5.2)
19. Accessing help programmatically (improved in 5.2)
20. Configuration of your own translation (new in 5.2)
21. Standardization of built-in elements descriptions (new in 5.2)
Tutorial Math Collection API spec Download
Package installation
Nuget – Package Manager (C#, F#, Visual Basic, …)
Install-Package
MathParser.org-mXparser
-Version
6.1.0
dotnet add package
MathParser.org-mXparser
--version
6.1.0
<PackageReference Include=
"MathParser.org-mXparser"
Version=
"6.1.0"
/>
Maven – Dependency (Java, Kotlin, Scala, Groovy, …)
<dependency>
<groupid>org.mariuszgromada.math
</groupid>
<artifactid>MathParser.org-mXparser
</artifactid>
<version>6.1.0
</version>
</dependency>
Maven – Gradle
implementation
'org.mariuszgromada.math:MathParser.org-mXparser:6.1.0'
CMake – Dependency / FetchContent (C++, MSVC, LLVM/Clang, GNU/GCC, MinGW, MSYS2, WSL, Windows, Linux, Unix, MacOS)
include(FetchContent)
FetchContent_Declare(
MathParserOrgMxParser
GIT_REPOSITORY https://github.com/mariuszgromada/MathParser.org-mXparser.git
GIT_TAG v.6.1.0
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.8+: 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 (C#, F#, Visual Basic, …)
Install-Package
MathParser.org-mXparser
-Version
6.1.0
dotnet add package
MathParser.org-mXparser
--version
6.1.0
<PackageReference Include=
"MathParser.org-mXparser"
Version=
"6.1.0"
/>
Maven – Dependency (Java, Kotlin, Scala, Groovy, …)
<dependency>
<groupid>org.mariuszgromada.math
</groupid>
<artifactid>MathParser.org-mXparser
</artifactid>
<version>6.1.0
</version>
</dependency>
Maven – Gradle
implementation
'org.mariuszgromada.math:MathParser.org-mXparser:6.1.0'
CMake – Dependency / FetchContent (C++, MSVC, LLVM/Clang, GNU/GCC, MinGW, MSYS2, WSL, Windows, Linux, Unix, MacOS)
include(FetchContent)
FetchContent_Declare(
MathParserOrgMxParser
GIT_REPOSITORY https://github.com/mariuszgromada/MathParser.org-mXparser.git
GIT_TAG v.6.1.0
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.1.0 Sagitara: .NET bin onlyDownload latest release – v.6.1.0 Sagitara: JAVA bin onlyDownload latest release – v.6.1.0 Sagitara: bin + doc
NEWS FROM MATHPARSER.ORG
SOURCE CODE
Source code .zipSource code .tar.gz
View on GitHubMathSpace.pl