Skip to main content

MathLang is a specially designed programming language for maths.

Project description

MathLang

MathLang is a specially designed programming language for maths.

Features

MathLang can:

  • Solve maths equations

  • Plot 2D graphs of functions

  • Differentiate and integrate any functions

(and many more...)

And what's the best thing about it? You can do any of this with a single line!

Examples

A simple MathLang program looks like this:

# Define f(x)
# x is a reserved name for variables
f = 5*x^2 + 11*x - 16;

# Calculate f(x) at x = 2 -> f(2)
PRINT f(2);

# Solve f(x) for real roots
real_roots = SOLVE f IN REAL;

# Print real roots of f(x)
PRINT real_roots;

# Differentiate f(x)
f1 = DIFFERENTIATE f TO x;

# Print the first derivative of f(x)
PRINT f1;

Documentation

To be updated...

Limitation

As of now, the backend of MathLang is a MathLang-to-Python transpiler. In other words, Grapher source code is translated to Python source code, which is then executed with a Python engine.

Hence, the performance of MathLang largely depends on Python itself (and various other dependencies). The reason for this is that Python has a repertoire of libraries that make symbolic maths and plotting simpler to do.

However, in the future, we aim to either (1) develop a MathLang-to-C transpiler or (2) incorporate a Python-to-C transpiler with the current Grapher-to-Python one.

License

This project is licensed under the MIT licence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MathLang-Core-2021.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

MathLang_Core-2021.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file MathLang-Core-2021.0.tar.gz.

File metadata

  • Download URL: MathLang-Core-2021.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

File hashes

Hashes for MathLang-Core-2021.0.tar.gz
Algorithm Hash digest
SHA256 987c0bde71b99f230d7fa6162f2ca89d331a08e3015808a9f27534d691a28661
MD5 e6c85eb44b9624f10e1441d4fd323c8d
BLAKE2b-256 2a729fabd9493d6491ee7640ddf9768d83525b370c8e0b398dd949a141664f3f

See more details on using hashes here.

File details

Details for the file MathLang_Core-2021.0-py3-none-any.whl.

File metadata

  • Download URL: MathLang_Core-2021.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

File hashes

Hashes for MathLang_Core-2021.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01c2a8198a213d6985f89484f48ed1235fafa33eced8e2f737e5e64cca067612
MD5 e13181e04624832b9f225c28e40c33e7
BLAKE2b-256 9dfc5baa8d51d679726d52be656e1f5c5e0f40096a628373edb83293f3473c19

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page