TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!
Tutorial Math Collection API spec Download
A “Hello World!” in mathematical language?
mXparser is a math parser library, so printing just “Hello World” string is to little 🙂 In order to satisfy deep math needs :-), but still keeping simplicity of the “Hello World!” code, I decided to present two equations:
- the first one representing “Hello” string and
- the second one “World!” string.
The idea is simple, each word can be translated into series of numbers (each one representing ASCII code of a particular letter), converting this numbers into hex string bytes, after strings concatenation, we are getting final hex string, which can be then converted into decimal number. This operation can be inverted, so we can take decimal number, convert it into hex string, partition hex string into hex byte pieces, and finally pickup ASCII letters 🙂 This inversion will be our “mXparser – Hello Word!” code!
Letter | ASCII code – dec | ASCII code – hex |
---|---|---|
H | 72 | 48 |
e | 101 | 65 |
l | 108 | 6C |
l | 108 | 6C |
o | 111 | 6F |
- Text = Hello
- Hex string = 48656C6C6F
- Decimal number = 310939249775
- Prime factorization – for more fun 🙂 – of 310939249775 = $$5^2\cdot 7^3\cdot 11^1\cdot 67^1\cdot 49201^1$$
Letter | ASCII code – dec | ASCII code – hex |
---|---|---|
W | 87 | 57 |
o | 111 | 6F |
r | 114 | 72 |
l | 108 | 6C |
d | 100 | 64 |
! | 33 | 21 |
- Text = World!
- Hex string = 576F726C6421
- Decimal number = 96136172692513
- Prime factorization – for more fun 🙂 – of 96136172692513 = $$71^1\cdot 218549^1\cdot 6195547^1$$
We have all we need, so lets do this in 5 different languages 🙂 : JAVA, C#, Visual Basic, C++/CLI, F# – all 5 implementations will use the same API provided by mXparser library!
- JAVA – using Eclipse Mars 1
- C# – using Visual Studio 2015
- Visual Basic – using Visual Studio 2015
- C++/CLI – using Visual Studio 2015
- F# – – using Visual Studio 2015
- C# – – using Mono Develop 4.0
Above tutorials present detailed steps, each step documented with a screenshot! Mentioned “Hello World!” tutorials are also available on GitHub Repo.
Enjoy! 🙂
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