User defined constants

TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!

The tutorial consists of more than 200 live examples from 50 sections given separately for JAVA, C# and C++. 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, C# (the code for C# is almost identical) and C++. To copy the code, double-click inside the frame.

Java/C# code
// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Constant a = new Constant("a", 5);
Constant b = new Constant("b = 10");        
Expression e = new Expression("a+b", a, b);

mXparser.consolePrintln(a.getConstantName() + " = " + a.getConstantValue());
mXparser.consolePrintln(b.getConstantName() + " = " + b.getConstantValue());
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate());
C++ code
#include "org/mariuszgromada/math/mxparser.hpp"
// ...
ConstantPtr a = new_Constant("a", 5);
ConstantPtr b = new_Constant("b = 10");
ExpressionPtr e = new_Expression("a+b", a, b);

mXparser::consolePrintln(a->getConstantName() + " = " + a->getConstantValue());
mXparser::consolePrintln(b->getConstantName() + " = " + b->getConstantValue());
mXparser::consolePrintln("Res: " + e->getExpressionString() + " = " + e->calculate());
Code result
[mXparser-v.5.2.1] a = 5.0
[mXparser-v.5.2.1] b = 10.0
[mXparser-v.5.2.1] Res: a+b = 15.0
Nuget – Package Manager (C#, F#, Visual Basic, …)

Install-Package MathParser.org-mXparser -Version 6.1.0

Nuget – .NET CLI

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

Nuget – Package Reference

<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

My other creative spaces

DONATION
Did you find the software useful?
Please consider donation 🙂
DONATE
Thank you for using MathParser.org-mXparser
Great! That code snippet is already in your clipboard 🙂 Important – this page offers a detailed tutorial with a description of the syntax of the built-in math collection and an extensive API documentation. If you plan to use the software for a commercial purpose, please see the terms and conditions and the variants of the license.

Go back

Your message has been sent

Warning
Warning
Warning
Warning.

I wish you all the best 🙂
The download will start in a moment
Great! Thank you for using MathParser.org-mXparser 🙂 Important – this page offers a detailed tutorial with a description of the built-in math collection syntax and an extensive API documentation. If you plan to use the software for a commercial purpose, please see the terms and conditions and the variants of the license. If, for some reasons, the download did not start, please use these direct links: Binaries & Documentation or Binaries only

Go back

Your message has been sent

Warning
Warning
Warning
Warning.

I wish you all the best 🙂
Scalar - Scientific Calculator, Charts & Scripts

Scalar is a powerful math engine and math scripting language powered by the MathParser.org-mXparser

Click on the video and see Scalar in action 🙂

 

Scalar – lite version

Get it on Google Play

Scalar Pro – full professional version

Get it on Google Play

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close

Morty Proxy This is a proxified and sanitized view of the page, visit original site.