mXparser – Math Expression Evaluator / Parser – Library Description

MathParser.org-mXparser has been downloaded more than 3.400.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)

Tutorial Math Collection API spec Download

Package installation

Nuget – Package Manager

Install-Package MathParser.org-mXparser -Version 6.0.0

Nuget – .NET CLI

dotnet add package MathParser.org-mXparser --version 6.0.0

Nuget – Package Reference

<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'

Maven – Gradle (Kotlin)

implementation("org.mariuszgromada.math:MathParser.org-mXparser:6.0.0")

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, Android, 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 - Supported frameworks

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

mXparser - deomo - JAVA

C# Demo – showing how easy it is to define a user function along with its use in an expression

mXparser - deomo - C#

Few examples of string equivalent to the math formula notation:

MATH EXPRESSIONMXPARSER 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
Just a few examples of math expressions with corresponding mXparser syntax

Math parser – main features summary

FEATURECOMMENT / EXAMPLES
Broad list of supported frameworksJAVA, .NET – many versions
Rich Match Collection500+ built-in keywords including: operators, constants, math functions
Implied Multiplication2x+3sin(x)
2(3+4)2(4+3)
Unicode Symbolsα, β, …
∑, ∛, …
⊽, ⊼, ⇔, ..
×, ÷, …
User Defined Argumentsx = 2
y = 2x
User Defined Functionsf(x) = 2x
f(x,y) = sin(x)+cos(y)
User Defined Variadic Functionsf(…) = sum(i, 1, [npar], par(i) )
User Defined Constantsa = 2
User Defined Random VariablesRandom value on each call
User Defined RecursionFully supported
Evaluating conditionsif(a=true, then b, else c)
Cases functionsiff(case1, then a1, case2, then a2, …)
Iterated operatorssum( 1, n, f(…,i) {step} )
prod( 1, n, f(…,i) {step} )
Derivativesder( sin(x), x) )
Integrals2*int( sqrt(1-x^2), x, -1, 1)
Syntax checkingCheck syntax
Check Lex syntax
Calculation Steps RegisterFlexible registration of all the calculation steps.
List of main features

Rich Match Collection: list of 500+ built-in keywords

BUILT-IN KEYWORD CATEGORY# OF BUILT-IN KEYWORDS
Operator16
Boolean Operator40
Bitwise Operator6
Binary Relation14
Math Constant
Physical Constant
Astronomical Constant
93
Unit105
Iterated Operator12
Calculus Operator15
Unary Function105
Binary Function36
3-args Function15
Variadic Function23
Random Variable32
Parser Symbol5
Number Literals6
TOTAL500+
Rich match collection

Supported frameworks

JAVA1.6+: separate binaries for each version
Androidfully tested with JAVA binaries
.NET5.0+: separate binaries for each version
.NET Framework / MONO3.5+: separate binaries for each version
.NET Core1.0+: separate binaries for each version
.NET Standard1.0+: separate binaries for each version
.NET PCLportable45, win8, wpa81
Xamarin.Andoird1.0, 6.0
Xamarin.iOS1.0
Broad list of supported frameworks
Nuget – Package Manager

Install-Package MathParser.org-mXparser -Version 6.0.0

Nuget – .NET CLI

dotnet add package MathParser.org-mXparser --version 6.0.0

Nuget – Package Reference

<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'

Maven – Gradle (Kotlin)

implementation("org.mariuszgromada.math:MathParser.org-mXparser:6.0.0")

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

My other creative spaces