MathScript is a simple, yet powerful, programming language designed with mathematics in mind. It offers a clean and intuitive syntax, making it ideal for:
- Mathematical calculations: Perform complex operations, and work with maths effortlessly.
- Data analysis: Analyze and visualize data, perform statistical calculations, and build data models.
- Algorithm development: Develop algorithms, solve equations, and create simulations.
- Intuitive Syntax: Inspired by mathematical notation, MathScript's syntax feels natural and easy to learn.
- Data Structures: Supports integers, decimals, complex numbers, strings, lists, and functions.
- Control Flow: Includes
if
,elif
,else
,for
,while
, andfunc
statements for structured programming. - Built-in Functions: Provides a collection of useful built-in functions for mathematical operations, input/output, and more.
- Extensibility: The language is designed to be extensible with user-defined functions.
- Cross-Platform: Runs on Windows, Linux, macOS and other platforms.
- Install MathScript:
- From the GitHub release
- Or fork the repsitory and then build
- Run a program:
Or start an interractive shell:
mathscript <your_program.mscr>
mathscript
MathScript uses cx_Freeze
for building the binaries.
Firstly, you need to install the dependencies:
pip install -r requirements.txt
Then you can build the binaries by running the following command:
python setup.py build
This will create a build/
directory containing the binaries for your platform in a subdirectory. The MathScript executable will be in the subdirectory of your platform and will be named mathscript
.
Here's a simple MathScript program to calculate the area of a circle:
func circle_area(radius) => pi * radius ^ 2
print(circle_area(5))
Contributions to MathScript are always welcome! Feel free to submit issues, pull requests, or suggest new features.
- Fork the repository.
- Create a new branch for your feature or fix.
- Make your changes.
- Test your changes thoroughly.
- Submit a pull request.
MathScript is licensed under the GNU General Public License v2.0. See the LICENSE
file for details.