Hello World

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!

  1. JAVA – using Eclipse Mars 1
  2. C# – using Visual Studio 2015
  3. Visual Basic – using Visual Studio 2015
  4. C++/CLI  – using Visual Studio 2015
  5. F# –  – using Visual Studio 2015
  6. 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
Install-Package MathParser.org-mXparser -Version 5.0.2
Maven
<dependency>
<groupid>org.mariuszgromada.math</groupid>
<artifactid>MathParser.org-mXparser</artifactid>
<version>5.0.2</version>
</dependency>
Gradle
implementation 'org.mariuszgromada.math:MathParser.org-mXparser:5.0.2'
Gradle (Kotlin)
implementation("org.mariuszgromada.math:MathParser.org-mXparser:5.0.2")
GitHub
git clone https://github.com/mariuszgromada/MathParser.org-mXparser
OTHER DOWNLOAD OPTIONS

Download latest release – v.5.0.2 Leonis: bin + docDownload latest release – v.5.0.2 Leonis: bin only, includes separate binaries for various .NET platforms and Java versions
Source code .zipSource code .tar.gz
View on GitHubMathSpace.pl

DONATION
Did you find the software useful?
Please consider donation 🙂
DONATE