@mathflowjs/mathflow
v1.0.0
Published
A lightweight library for evaluating mathematical expressions written in natural mathematical notation.
Maintainers
Readme
Mathflow
Simplifying Math, Empowering Code.
Overview
Mathflow is a lightweight JavaScript library for evaluating mathematical expressions written in natural mathematical notation. It parses and computes standard arithmetic, trignometric functions, logarithms, and algebraic expressions exactly as you would write them on paper.
Features
- Natural syntax: Write
2x + 3(y - 1)instead of2*x + 3*(y - 1). Both are supported anyway. - Mathematical functions: Built-in support for
sin,cos,tan,log,sqrt,abs, and more. - Variables: Assign and use variables like
x = 5,y = 5x - 1 - Clean & modern syntax: Readable and easy-to-write syntax for mathematical expressions.
- AST-based parsing: Proper order of operations and expression evaluation.
- Lightweight: Focused purely on mathematical computation without bloat.
Use Cases
- Formula calculators and mathematical tools.
- Educational applications for learning mathematics.
- Basic scientific computing interfaces.
- Anywhere you need to evaluate user-input mathematical expressions safely.
Documentation
To get started with Mathflow, read the documentation here.
Contributing
Contributions are welcome to make Mathflow even better! Feel free to open issues or submit pull requests.
License
This project is licensed under the MIT License
Copyright © 2024-present, Henry Hale
