A lightweight and expressive scripting language designed for mathematical expressions and calculations.
Developer toolsTypeScript · HTMLGitHub @mathflowjsOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
🟦 A lightweight JavaScript library for evaluating mathematical expressions written in natural mathematical notation.
Translation pending
Taken from the repository README
Loading the full README.
Read the full README ↗Simplifying Math, Empowering Code.
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.
2x + 3(y - 1) instead of 2*x + 3*(y - 1). Both are supported anyway.x = 5, y = 5x - 1import { createContext } from '@mathflowjs/mathflow';
const ctx = createContext({ preferences: { angles: 'deg' } });
ctx.solve('x = 5');
ctx.solve('2x^3 + sqrt(25)');
// {
// value: 255,
// solution: [
// '2 * 5 ^ 3 + sqrt(25)',
// '2 * 125 + 5',
// '250 + 5',
// '255'
// ]
// }
Every value is a plain number, so a data set is written variadically:
mean(1, 2, 3), not mean([1, 2, 3]). See TODO.md for the full
function list and for what is deliberately out of scope.
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