mXparser - Hello World

A "Hello World!" in mathematical language?

MathParser.org - mXparser - logo - Tutorial

*** If you found the software useful donation is something you might consider 🙂 ***

If you found the software useful donation is something you might consider :-)

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.

*** If you found the software useful donation is something you might consider 🙂 ***

If you found the software useful donation is something you might consider :-)

Enjoy! 🙂

 

Best regards,

Mariusz Gromada

Download latest release – v.4.0.0.2: bin + doc + src (.zip 10.7 MB)

Download latest release – v.4.0.0.2: bin only (.zip 3.04 MB) – separate binaries for java: 1.5, 1.6, 1.7, 1.8; .NET: 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS

Source code .zipSource code .tar.gz View on GitHubMathSpace.pl