Skip to content

🟦 A lightweight JavaScript library for evaluating mathematical expressions written in natural mathematical notation.

License

Notifications You must be signed in to change notification settings

mathflowjs/mathflow

Repository files navigation

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 of 2*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

About

🟦 A lightweight JavaScript library for evaluating mathematical expressions written in natural mathematical notation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published