Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 818 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 818 Bytes

Algebra

Welcome to my algebra expression (or equation) simplifier, made with vanilla JavaScript! It supports addition, subtraction, division (by numbers only), multiplication, and exponents.

How to Run

To see it in action, go here. To see the code, go to script.js.

How it works

Go to script.js to see the commented code. The function doAll("...") simplifies something.

On a high level, it works by parsing the expression as a string (it doesn't convert the expression into computer-readable code). I started by making a parser for just arithmetic, and then expanded it to work with variables as well.

Bugs

I've done a lot of debugging with this but there's probably still bugs in there. If you find one, please let me know by starting an issue.