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.
- 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.
- Formula calculators and mathematical tools.
- Educational applications for learning mathematics.
- Basic scientific computing interfaces.
- Anywhere you need to evaluate user-input mathematical expressions safely.
To get started with MathFlow, read the documentation here.
Contributions are welcome to make MathFlow even better! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License
Copyright © 2024-present, Henry Hale